home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-07-14 | 48.3 KB | [TEXT/PJMM] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ICCAPIGlue.p
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Applause Picture (image/applausePicture)
| ext
| Unsupported |
1%
| dexvert
| bsdiff patch (other/bsdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| imgdiff patch (other/imgdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| MATLAB p-code (other/matlabPCode)
| ext
| Unsupported |
1%
| dexvert
| WSUS Patch Storage File (other/wsusPatchStorageFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Jul 14 20:22:32 1996, modified Sun Jul 14 20:22:32 1996, creator Think Pascal, type ASCII, 29400 bytes "ICCAPIGlue.p" , at 0x7358 19815 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [PJMM] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 49 43 43 41 50 49 | 47 6c 75 65 2e 70 00 00 |..ICCAPI|Glue.p..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 50 4a 4d | 4d 01 00 00 00 00 00 00 |.TEXTPJM|M.......|
|00000050| 00 00 00 00 00 72 d8 00 | 00 4d 67 ae 0f 3f c8 ae |.....r..|.Mg..?..|
|00000060| 0f 3f c8 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.?......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c4 44 00 00 |........|.....D..|
|00000080| 75 6e 69 74 20 49 43 43 | 41 50 49 47 6c 75 65 3b |unit ICC|APIGlue;|
|00000090| 0d 0d 28 2a 20 a5 a5 a5 | 53 74 61 72 74 20 48 65 |..(* ...|Start He|
|000000a0| 61 64 65 72 a5 a5 a5 20 | 2a 29 0d 0d 28 2a 20 46 |ader... |*)..(* F|
|000000b0| 69 6c 65 3a 20 20 20 20 | 20 20 20 20 20 49 43 43 |ile: | ICC|
|000000c0| 41 50 49 2e 70 20 28 69 | 6d 70 6c 29 0d 20 2a 20 |API.p (i|mpl). * |
|000000d0| 47 65 6e 65 72 61 74 65 | 64 20 62 79 3a 20 31 2e |Generate|d by: 1.|
|000000e0| 30 64 34 0d 20 2a 20 46 | 6f 72 3a 20 20 20 20 20 |0d4. * F|or: |
|000000f0| 20 20 20 20 20 49 43 20 | 31 2e 33 0d 20 2a 20 4f | IC |1.3. * O|
|00000100| 6e 3a 20 20 20 20 20 20 | 20 20 20 20 20 53 75 6e |n: | Sun|
|00000110| 64 61 79 2c 20 31 34 20 | 4a 75 6c 79 20 31 39 39 |day, 14 |July 199|
|00000120| 36 2c 20 32 30 3a 31 39 | 3a 35 35 0d 20 2a 20 0d |6, 20:19|:55. * .|
|00000130| 20 2a 20 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 | * This |file is |
|00000140| 70 61 72 74 20 6f 66 20 | 74 68 65 20 49 6e 74 65 |part of |the Inte|
|00000150| 72 6e 65 74 20 43 6f 6e | 66 69 67 75 72 61 74 69 |rnet Con|figurati|
|00000160| 6f 6e 20 73 79 73 74 65 | 6d 20 61 6e 64 0d 20 2a |on syste|m and. *|
|00000170| 20 69 73 20 70 6c 61 63 | 65 64 20 69 6e 20 74 68 | is plac|ed in th|
|00000180| 65 20 70 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 20 |e public| domain |
|00000190| 66 6f 72 20 74 68 65 20 | 62 65 6e 65 66 69 74 20 |for the |benefit |
|000001a0| 6f 66 20 61 6c 6c 2e 0d | 20 2a 29 0d 0d 28 2a 20 |of all..| *)..(* |
|000001b0| a5 a5 a5 45 6e 64 20 48 | 65 61 64 65 72 a5 a5 a5 |...End H|eader...|
|000001c0| 20 2a 29 0d 0d 69 6e 74 | 65 72 66 61 63 65 0d 0d | *)..int|erface..|
|000001d0| 09 75 73 65 73 0d 7b 24 | 69 66 63 20 75 6e 64 65 |.uses.{$|ifc unde|
|000001e0| 66 69 6e 65 64 20 54 48 | 49 4e 4b 5f 50 61 73 63 |fined TH|INK_Pasc|
|000001f0| 61 6c 7d 0d 09 09 54 79 | 70 65 73 2c 20 46 69 6c |al}...Ty|pes, Fil|
|00000200| 65 73 2c 20 51 75 69 63 | 6b 44 72 61 77 2c 20 41 |es, Quic|kDraw, A|
|00000210| 70 70 6c 65 54 61 6c 6b | 2c 20 41 6c 69 61 73 65 |ppleTalk|, Aliase|
|00000220| 73 2c 20 0d 7b 24 65 6e | 64 63 7d 0d 09 09 43 6f |s, .{$en|dc}...Co|
|00000230| 6d 70 6f 6e 65 6e 74 73 | 2c 20 49 43 54 79 70 65 |mponents|, ICType|
|00000240| 73 2c 20 49 43 4b 65 79 | 73 3b 0d 0d 09 63 6f 6e |s, ICKey|s;...con|
|00000250| 73 74 0d 09 09 69 6e 74 | 65 72 6e 65 74 43 6f 6e |st...int|ernetCon|
|00000260| 66 69 67 75 72 61 74 69 | 6f 6e 43 6f 6d 70 6f 6e |figurati|onCompon|
|00000270| 65 6e 74 54 79 70 65 20 | 3d 20 27 50 52 45 46 27 |entType |= 'PREF'|
|00000280| 3b 09 09 09 09 28 2a 20 | 74 68 65 20 63 6f 6d 70 |;....(* |the comp|
|00000290| 6f 6e 65 6e 74 20 74 79 | 70 65 20 2a 29 0d 09 09 |onent ty|pe *)...|
|000002a0| 69 6e 74 65 72 6e 65 74 | 43 6f 6e 66 69 67 75 72 |internet|Configur|
|000002b0| 61 74 69 6f 6e 43 6f 6d | 70 6f 6e 65 6e 74 53 75 |ationCom|ponentSu|
|000002c0| 62 54 79 70 65 20 3d 20 | 27 49 43 41 70 27 3b 09 |bType = |'ICAp';.|
|000002d0| 09 09 28 2a 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |..(* the| compone|
|000002e0| 6e 74 20 73 75 62 74 79 | 70 65 20 2a 29 0d 09 09 |nt subty|pe *)...|
|000002f0| 69 6e 74 65 72 6e 65 74 | 43 6f 6e 66 69 67 75 72 |internet|Configur|
|00000300| 61 74 69 6f 6e 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |ationCom|ponentIn|
|00000310| 74 65 72 66 61 63 65 56 | 65 72 73 69 6f 6e 30 20 |terfaceV|ersion0 |
|00000320| 3d 20 24 30 30 30 30 30 | 30 30 30 3b 0d 09 09 69 |= $00000|000;...i|
|00000330| 6e 74 65 72 6e 65 74 43 | 6f 6e 66 69 67 75 72 61 |nternetC|onfigura|
|00000340| 74 69 6f 6e 43 6f 6d 70 | 6f 6e 65 6e 74 49 6e 74 |tionComp|onentInt|
|00000350| 65 72 66 61 63 65 56 65 | 72 73 69 6f 6e 31 20 3d |erfaceVe|rsion1 =|
|00000360| 20 24 30 30 30 31 30 30 | 30 30 3b 0d 28 2a 20 63 | $000100|00;.(* c|
|00000370| 75 72 72 65 6e 74 20 76 | 65 72 73 69 6f 6e 20 6e |urrent v|ersion n|
|00000380| 75 6d 62 65 72 20 69 73 | 20 76 65 72 73 69 6f 6e |umber is| version|
|00000390| 20 31 20 2a 29 0d 09 09 | 69 6e 74 65 72 6e 65 74 | 1 *)...|internet|
|000003a0| 43 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 43 6f 6d |Configur|ationCom|
|000003b0| 70 6f 6e 65 6e 74 49 6e | 74 65 72 66 61 63 65 56 |ponentIn|terfaceV|
|000003c0| 65 72 73 69 6f 6e 20 3d | 20 69 6e 74 65 72 6e 65 |ersion =| interne|
|000003d0| 74 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 43 6f |tConfigu|rationCo|
|000003e0| 6d 70 6f 6e 65 6e 74 49 | 6e 74 65 72 66 61 63 65 |mponentI|nterface|
|000003f0| 56 65 72 73 69 6f 6e 31 | 3b 0d 0d 28 2a 20 a5 a5 |Version1|;..(* ..|
|00000400| a5 53 74 61 72 74 20 49 | 43 43 41 50 49 2e 70 a5 |.Start I|CCAPI.p.|
|00000410| a5 a5 20 2a 29 0d 0d 20 | 20 28 2a 20 2a 2a 2a 2a |.. *).. | (* ****|
|00000420| 2a 20 53 74 61 72 74 69 | 6e 67 20 55 70 20 61 6e |* Starti|ng Up an|
|00000430| 64 20 53 68 75 74 74 69 | 6e 67 20 44 6f 77 6e 20 |d Shutti|ng Down |
|00000440| 2a 2a 2a 2a 2a 20 2a 29 | 0d 20 20 0d 20 20 66 75 |***** *)|. . fu|
|00000450| 6e 63 74 69 6f 6e 20 49 | 43 43 53 74 61 72 74 28 |nction I|CCStart(|
|00000460| 76 61 72 20 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |var inst| : Compo|
|00000470| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 63 72 |nentInst|ance; cr|
|00000480| 65 61 74 6f 72 20 3a 20 | 4f 53 54 79 70 65 29 20 |eator : |OSType) |
|00000490| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 20 20 28 |: ICErro|r;. (|
|000004a0| 2a 20 43 61 6c 6c 20 74 | 68 69 73 20 61 74 20 61 |* Call t|his at a|
|000004b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 6e 69 74 69 |pplicati|on initi|
|000004c0| 61 6c 69 73 61 74 69 6f | 6e 2e 20 53 65 74 20 63 |alisatio|n. Set c|
|000004d0| 72 65 61 74 6f 72 20 74 | 6f 20 79 6f 75 72 20 61 |reator t|o your a|
|000004e0| 70 70 6c 69 63 61 74 69 | 6f 6e 0d 20 20 20 20 20 |pplicati|on. |
|000004f0| 2a 20 63 72 65 61 74 6f | 72 20 74 6f 20 61 6c 6c |* creato|r to all|
|00000500| 6f 77 20 66 6f 72 20 66 | 75 74 75 72 65 20 65 78 |ow for f|uture ex|
|00000510| 70 61 6e 73 69 6f 6e 20 | 6f 66 20 74 68 65 20 49 |pansion |of the I|
|00000520| 43 20 73 79 73 74 65 6d | 2e 20 52 65 74 75 72 6e |C system|. Return|
|00000530| 73 0d 20 20 20 20 20 2a | 20 69 6e 73 74 20 61 73 |s. *| inst as|
|00000540| 20 61 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 74 6f | a conne|ction to|
|00000550| 20 74 68 65 20 49 43 20 | 73 79 73 74 65 6d 2e 0d | the IC |system..|
|00000560| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00000570| 63 74 69 6f 6e 20 49 43 | 43 53 74 6f 70 28 69 6e |ction IC|CStop(in|
|00000580| 73 74 20 3a 20 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |st : Com|ponentIn|
|00000590| 73 74 61 6e 63 65 29 20 | 3a 20 49 43 45 72 72 6f |stance) |: ICErro|
|000005a0| 72 3b 0d 20 20 20 20 28 | 2a 20 49 74 20 69 73 20 |r;. (|* It is |
|000005b0| 69 6c 6c 65 67 61 6c 20 | 74 6f 20 63 61 6c 6c 20 |illegal |to call |
|000005c0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 69 6e 73 |this rou|tine ins|
|000005d0| 69 64 65 20 61 20 49 43 | 42 65 67 69 6e 2f 45 6e |ide a IC|Begin/En|
|000005e0| 64 20 70 61 69 72 2e 0d | 20 20 20 20 20 2a 20 43 |d pair..| * C|
|000005f0| 61 6c 6c 20 74 68 69 73 | 20 61 74 20 61 70 70 6c |all this| at appl|
|00000600| 69 63 61 74 69 6f 6e 20 | 69 6e 69 74 69 61 6c 69 |ication |initiali|
|00000610| 73 61 74 69 6f 6e 2c 20 | 61 66 74 65 72 20 77 68 |sation, |after wh|
|00000620| 69 63 68 20 69 6e 73 74 | 0d 20 20 20 20 20 2a 20 |ich inst|. * |
|00000630| 69 73 20 6e 6f 20 6c 6f | 6e 67 65 72 20 76 61 6c |is no lo|nger val|
|00000640| 69 64 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 74 6f |id conne|ction to|
|00000650| 20 49 43 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d | IC.. | *). .|
|00000660| 20 20 28 2a 20 2a 2a 2a | 2a 2a 20 53 70 65 63 69 | (* ***|** Speci|
|00000670| 66 79 69 6e 67 20 61 20 | 43 6f 6e 66 69 67 75 72 |fying a |Configur|
|00000680| 61 74 69 6f 6e 20 2a 2a | 2a 2a 2a 20 2a 29 0d 20 |ation **|*** *). |
|00000690| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 43 | . func|tion ICC|
|000006a0| 46 69 6e 64 43 6f 6e 66 | 69 67 46 69 6c 65 28 69 |FindConf|igFile(i|
|000006b0| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|000006c0| 6e 73 74 61 6e 63 65 3b | 20 63 6f 75 6e 74 20 3a |nstance;| count :|
|000006d0| 20 69 6e 74 65 67 65 72 | 3b 20 66 6f 6c 64 65 72 | integer|; folder|
|000006e0| 73 20 3a 20 49 43 44 69 | 72 53 70 65 63 41 72 72 |s : ICDi|rSpecArr|
|000006f0| 61 79 50 74 72 29 20 3a | 20 49 43 45 72 72 6f 72 |ayPtr) :| ICError|
|00000700| 3b 0d 20 20 7b 24 69 66 | 63 20 6e 6f 74 20 47 65 |;. {$if|c not Ge|
|00000710| 6e 65 72 61 74 69 6e 67 | 43 46 4d 7d 0d 20 20 20 |nerating|CFM}. |
|00000720| 20 69 6e 6c 69 6e 65 20 | 24 32 46 33 43 2c 20 36 | inline |$2F3C, 6|
|00000730| 2c 20 32 2c 20 24 37 30 | 30 30 2c 20 24 41 38 32 |, 2, $70|00, $A82|
|00000740| 41 3b 0d 20 20 7b 24 65 | 6e 64 63 7d 0d 20 20 20 |A;. {$e|ndc}. |
|00000750| 20 28 2a 20 49 74 20 69 | 73 20 69 6c 6c 65 67 61 | (* It i|s illega|
|00000760| 6c 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |l to cal|l this r|
|00000770| 6f 75 74 69 6e 65 20 69 | 6e 73 69 64 65 20 61 20 |outine i|nside a |
|00000780| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00000790| 2e 0d 20 20 20 20 20 2a | 20 43 61 6c 6c 20 74 6f |.. *| Call to|
|000007a0| 20 63 6f 6e 66 69 67 75 | 72 65 20 74 68 69 73 20 | configu|re this |
|000007b0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 74 6f 20 49 43 |connecti|on to IC|
|000007c0| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 20 63 6f 75 |.. *| Set cou|
|000007d0| 6e 74 20 61 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |nt as th|e number|
|000007e0| 20 6f 66 20 76 61 6c 69 | 64 20 65 6c 65 6d 65 6e | of vali|d elemen|
|000007f0| 74 73 20 69 6e 20 66 6f | 6c 64 65 72 73 2e 0d 20 |ts in fo|lders.. |
|00000800| 20 20 20 20 2a 20 53 65 | 74 20 66 6f 6c 64 65 72 | * Se|t folder|
|00000810| 73 20 74 6f 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |s to a p|ointer t|
|00000820| 6f 20 74 68 65 20 66 6f | 6c 64 65 72 73 20 74 6f |o the fo|lders to|
|00000830| 20 73 65 61 72 63 68 2e | 0d 20 20 20 20 20 2a 20 | search.|. * |
|00000840| 53 65 74 74 69 6e 67 20 | 63 6f 75 6e 74 20 74 6f |Setting |count to|
|00000850| 20 30 20 61 6e 64 20 66 | 6f 6c 64 65 72 73 20 74 | 0 and f|olders t|
|00000860| 6f 20 6e 69 6c 20 69 73 | 20 4f 4b 2e 0d 20 20 20 |o nil is| OK.. |
|00000870| 20 20 2a 20 53 65 61 72 | 63 68 65 73 20 74 68 65 | * Sear|ches the|
|00000880| 20 73 70 65 63 69 66 69 | 65 64 20 66 6f 6c 64 65 | specifi|ed folde|
|00000890| 72 73 20 61 6e 64 20 74 | 68 65 6e 20 74 68 65 20 |rs and t|hen the |
|000008a0| 50 72 65 66 65 72 65 6e | 63 65 73 20 66 6f 6c 64 |Preferen|ces fold|
|000008b0| 65 72 0d 20 20 20 20 20 | 2a 20 69 6e 20 61 20 75 |er. |* in a u|
|000008c0| 6e 73 70 65 63 69 66 69 | 65 64 20 6d 61 6e 6e 65 |nspecifi|ed manne|
|000008d0| 72 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |r.. |*). . |
|000008e0| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 46 69 6e 64 |function| ICCFind|
|000008f0| 55 73 65 72 43 6f 6e 66 | 69 67 46 69 6c 65 28 69 |UserConf|igFile(i|
|00000900| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|00000910| 6e 73 74 61 6e 63 65 3b | 20 76 61 72 20 77 68 65 |nstance;| var whe|
|00000920| 72 65 20 3a 20 49 43 44 | 69 72 53 70 65 63 29 20 |re : ICD|irSpec) |
|00000930| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|00000940| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|00000950| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00000960| 20 24 32 46 33 43 2c 20 | 34 2c 20 31 34 2c 20 24 | $2F3C, |4, 14, $|
|00000970| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00000980| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00000990| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|000009a0| 20 20 20 20 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | * It| is ille|
|000009b0| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|000009c0| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|000009d0| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|000009e0| 69 72 2e 0d 20 20 20 20 | 20 2a 20 53 69 6d 69 6c |ir.. | * Simil|
|000009f0| 61 72 20 74 6f 20 49 43 | 46 69 6e 64 43 6f 6e 66 |ar to IC|FindConf|
|00000a00| 69 67 46 69 6c 65 20 65 | 78 63 65 70 74 20 74 68 |igFile e|xcept th|
|00000a10| 61 74 20 69 74 20 6f 6e | 6c 79 20 73 65 61 72 63 |at it on|ly searc|
|00000a20| 68 65 73 20 74 68 65 20 | 66 6f 6c 64 65 72 0d 20 |hes the |folder. |
|00000a30| 20 20 20 20 2a 20 73 70 | 65 63 69 66 69 65 64 20 | * sp|ecified |
|00000a40| 69 6e 20 77 68 65 72 65 | 2e 20 20 49 66 20 74 68 |in where|. If th|
|00000a50| 65 20 69 6e 70 75 74 20 | 70 61 72 61 6d 65 74 65 |e input |paramete|
|00000a60| 72 73 20 61 72 65 20 76 | 61 6c 69 64 20 74 68 65 |rs are v|alid the|
|00000a70| 20 72 6f 75 74 69 6e 65 | 0d 20 20 20 20 20 2a 20 | routine|. * |
|00000a80| 77 69 6c 6c 20 61 6c 77 | 61 79 73 20 73 75 63 63 |will alw|ays succ|
|00000a90| 65 73 73 66 75 6c 20 63 | 6f 6e 66 69 67 75 72 65 |essful c|onfigure|
|00000aa0| 20 74 68 65 20 69 6e 73 | 74 61 6e 63 65 2c 20 63 | the ins|tance, c|
|00000ab0| 72 65 61 74 69 6e 67 20 | 61 6e 0d 20 20 20 20 20 |reating |an. |
|00000ac0| 2a 20 65 6d 70 74 79 20 | 63 6f 6e 66 69 67 75 72 |* empty |configur|
|00000ad0| 61 74 69 6f 6e 20 69 66 | 20 6e 65 63 65 73 73 61 |ation if| necessa|
|00000ae0| 72 79 0d 20 20 20 20 20 | 2a 20 46 6f 72 20 75 73 |ry. |* For us|
|00000af0| 65 20 77 69 74 68 20 64 | 6f 75 62 6c 65 2d 63 6c |e with d|ouble-cl|
|00000b00| 69 63 6b 61 62 6c 65 20 | 70 72 65 66 65 72 65 6e |ickable |preferen|
|00000b10| 63 65 20 66 69 6c 65 73 | 2e 0d 20 20 20 20 20 2a |ce files|.. *|
|00000b20| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|00000b30| 49 43 43 47 65 6e 65 72 | 61 6c 46 69 6e 64 43 6f |ICCGener|alFindCo|
|00000b40| 6e 66 69 67 46 69 6c 65 | 28 69 6e 73 74 20 3a 20 |nfigFile|(inst : |
|00000b50| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|00000b60| 65 3b 20 73 65 61 72 63 | 68 5f 70 72 65 66 73 20 |e; searc|h_prefs |
|00000b70| 3a 20 42 6f 6f 6c 65 61 | 6e 3b 20 63 61 6e 5f 63 |: Boolea|n; can_c|
|00000b80| 72 65 61 74 65 20 3a 20 | 42 6f 6f 6c 65 61 6e 3b |reate : |Boolean;|
|00000b90| 20 63 6f 75 6e 74 20 3a | 20 69 6e 74 65 67 65 72 | count :| integer|
|00000ba0| 3b 20 66 6f 6c 64 65 72 | 73 20 3a 20 49 43 44 69 |; folder|s : ICDi|
|00000bb0| 72 53 70 65 63 41 72 72 | 61 79 50 74 72 29 20 3a |rSpecArr|ayPtr) :|
|00000bc0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|00000bd0| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|00000be0| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|00000bf0| 24 32 46 33 43 2c 20 31 | 30 2c 20 33 30 2c 20 24 |$2F3C, 1|0, 30, $|
|00000c00| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00000c10| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00000c20| 71 75 69 72 65 73 20 49 | 43 20 31 2e 32 2e 0d 20 |quires I|C 1.2.. |
|00000c30| 20 20 20 20 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | * It| is ille|
|00000c40| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|00000c50| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|00000c60| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|00000c70| 69 72 2e 0d 20 20 20 20 | 20 2a 20 43 61 6c 6c 20 |ir.. | * Call |
|00000c80| 74 6f 20 63 6f 6e 66 69 | 67 75 72 65 20 74 68 69 |to confi|gure thi|
|00000c90| 73 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 6f 20 |s connec|tion to |
|00000ca0| 49 43 2e 0d 20 20 20 20 | 20 2a 20 54 68 69 73 20 |IC.. | * This |
|00000cb0| 72 6f 75 74 69 6e 65 20 | 61 63 74 73 20 61 73 20 |routine |acts as |
|00000cc0| 61 20 6d 6f 72 65 20 67 | 65 6e 65 72 61 6c 20 72 |a more g|eneral r|
|00000cd0| 65 70 6c 61 63 65 6d 65 | 6e 74 20 66 6f 72 0d 20 |eplaceme|nt for. |
|00000ce0| 20 20 20 20 2a 20 49 43 | 46 69 6e 64 43 6f 6e 66 | * IC|FindConf|
|00000cf0| 69 67 46 69 6c 65 20 61 | 6e 64 20 49 43 46 69 6e |igFile a|nd ICFin|
|00000d00| 64 55 73 65 72 43 6f 6e | 66 69 67 46 69 6c 65 2e |dUserCon|figFile.|
|00000d10| 0d 20 20 20 20 20 2a 20 | 53 65 74 20 73 65 61 72 |. * |Set sear|
|00000d20| 63 68 5f 70 72 65 66 73 | 20 74 6f 20 74 72 75 65 |ch_prefs| to true|
|00000d30| 20 69 66 20 79 6f 75 20 | 77 61 6e 74 20 69 74 20 | if you |want it |
|00000d40| 74 6f 20 73 65 61 72 63 | 68 20 74 68 65 20 70 72 |to searc|h the pr|
|00000d50| 65 66 65 72 65 6e 63 65 | 73 20 66 6f 6c 64 65 72 |eference|s folder|
|00000d60| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 20 63 61 6e |.. *| Set can|
|00000d70| 5f 63 72 65 61 74 65 20 | 74 6f 20 74 72 75 65 20 |_create |to true |
|00000d80| 69 66 20 79 6f 75 20 77 | 61 6e 74 20 69 74 20 74 |if you w|ant it t|
|00000d90| 6f 20 62 65 20 61 62 6c | 65 20 74 6f 20 63 72 65 |o be abl|e to cre|
|00000da0| 61 74 65 20 61 20 6e 65 | 77 20 63 6f 6e 66 69 67 |ate a ne|w config|
|00000db0| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 20 63 6f 75 |.. *| Set cou|
|00000dc0| 6e 74 20 61 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |nt as th|e number|
|00000dd0| 20 6f 66 20 76 61 6c 69 | 64 20 65 6c 65 6d 65 6e | of vali|d elemen|
|00000de0| 74 73 20 69 6e 20 66 6f | 6c 64 65 72 73 2e 0d 20 |ts in fo|lders.. |
|00000df0| 20 20 20 20 2a 20 53 65 | 74 20 66 6f 6c 64 65 72 | * Se|t folder|
|00000e00| 73 20 74 6f 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |s to a p|ointer t|
|00000e10| 6f 20 74 68 65 20 66 6f | 6c 64 65 72 73 20 74 6f |o the fo|lders to|
|00000e20| 20 73 65 61 72 63 68 2e | 0d 20 20 20 20 20 2a 20 | search.|. * |
|00000e30| 53 65 74 74 69 6e 67 20 | 63 6f 75 6e 74 20 74 6f |Setting |count to|
|00000e40| 20 30 20 61 6e 64 20 66 | 6f 6c 64 65 72 73 20 74 | 0 and f|olders t|
|00000e50| 6f 20 6e 69 6c 20 69 73 | 20 4f 4b 2e 0d 20 20 20 |o nil is| OK.. |
|00000e60| 20 20 2a 20 53 65 61 72 | 63 68 65 73 20 74 68 65 | * Sear|ches the|
|00000e70| 20 73 70 65 63 69 66 69 | 65 64 20 66 6f 6c 64 65 | specifi|ed folde|
|00000e80| 72 73 20 61 6e 64 20 74 | 68 65 6e 20 6f 70 74 69 |rs and t|hen opti|
|00000e90| 6f 6e 61 6c 6c 79 20 74 | 68 65 20 50 72 65 66 65 |onally t|he Prefe|
|00000ea0| 72 65 6e 63 65 73 20 66 | 6f 6c 64 65 72 0d 20 20 |rences f|older. |
|00000eb0| 20 20 20 2a 20 69 6e 20 | 61 20 75 6e 73 70 65 63 | * in |a unspec|
|00000ec0| 69 66 69 65 64 20 6d 61 | 6e 6e 65 72 2e 0d 20 20 |ified ma|nner.. |
|00000ed0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00000ee0| 69 6f 6e 20 49 43 43 43 | 68 6f 6f 73 65 43 6f 6e |ion ICCC|hooseCon|
|00000ef0| 66 69 67 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |fig(inst| : Compo|
|00000f00| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 29 20 3a 20 |nentInst|ance) : |
|00000f10| 49 43 45 72 72 6f 72 3b | 0d 20 20 7b 24 69 66 63 |ICError;|. {$ifc|
|00000f20| 20 6e 6f 74 20 47 65 6e | 65 72 61 74 69 6e 67 43 | not Gen|eratingC|
|00000f30| 46 4d 7d 0d 20 20 20 20 | 69 6e 6c 69 6e 65 20 24 |FM}. |inline $|
|00000f40| 32 46 33 43 2c 20 30 2c | 20 33 33 2c 20 24 37 30 |2F3C, 0,| 33, $70|
|00000f50| 30 30 2c 20 24 41 38 32 | 41 3b 0d 20 20 7b 24 65 |00, $A82|A;. {$e|
|00000f60| 6e 64 63 7d 0d 20 20 20 | 20 28 2a 20 52 65 71 75 |ndc}. | (* Requ|
|00000f70| 69 72 65 73 20 49 43 20 | 31 2e 32 2e 0d 20 20 20 |ires IC |1.2.. |
|00000f80| 20 20 2a 20 49 74 20 69 | 73 20 69 6c 6c 65 67 61 | * It i|s illega|
|00000f90| 6c 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |l to cal|l this r|
|00000fa0| 6f 75 74 69 6e 65 20 69 | 6e 73 69 64 65 20 61 20 |outine i|nside a |
|00000fb0| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00000fc0| 2e 0d 20 20 20 20 20 2a | 20 52 65 71 75 65 73 74 |.. *| Request|
|00000fd0| 73 20 74 68 65 20 75 73 | 65 72 20 74 6f 20 63 68 |s the us|er to ch|
|00000fe0| 6f 6f 73 65 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |oose a c|onfigura|
|00000ff0| 74 69 6f 6e 2c 20 74 79 | 70 69 63 61 6c 6c 79 20 |tion, ty|pically |
|00001000| 75 73 69 6e 67 20 73 6f | 6d 65 0d 20 20 20 20 20 |using so|me. |
|00001010| 2a 20 73 6f 72 74 20 6f | 66 20 6d 6f 64 61 6c 20 |* sort o|f modal |
|00001020| 64 69 61 6c 6f 67 2e 20 | 49 66 20 74 68 65 20 75 |dialog. |If the u|
|00001030| 73 65 72 20 63 61 6e 63 | 65 6c 73 20 74 68 65 20 |ser canc|els the |
|00001040| 64 69 61 6c 6f 67 20 74 | 68 65 20 63 6f 6e 66 69 |dialog t|he confi|
|00001050| 67 75 72 61 74 69 6f 6e | 0d 20 20 20 20 20 2a 20 |guration|. * |
|00001060| 73 74 61 74 65 20 77 69 | 6c 6c 20 62 65 20 75 6e |state wi|ll be un|
|00001070| 61 66 66 65 63 74 65 64 | 2e 0d 20 20 20 20 20 2a |affected|.. *|
|00001080| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|00001090| 49 43 43 43 68 6f 6f 73 | 65 4e 65 77 43 6f 6e 66 |ICCChoos|eNewConf|
|000010a0| 69 67 28 69 6e 73 74 20 | 3a 20 43 6f 6d 70 6f 6e |ig(inst |: Compon|
|000010b0| 65 6e 74 49 6e 73 74 61 | 6e 63 65 29 20 3a 20 49 |entInsta|nce) : I|
|000010c0| 43 45 72 72 6f 72 3b 0d | 20 20 7b 24 69 66 63 20 |CError;.| {$ifc |
|000010d0| 6e 6f 74 20 47 65 6e 65 | 72 61 74 69 6e 67 43 46 |not Gene|ratingCF|
|000010e0| 4d 7d 0d 20 20 20 20 69 | 6e 6c 69 6e 65 20 24 32 |M}. i|nline $2|
|000010f0| 46 33 43 2c 20 30 2c 20 | 33 34 2c 20 24 37 30 30 |F3C, 0, |34, $700|
|00001100| 30 2c 20 24 41 38 32 41 | 3b 0d 20 20 7b 24 65 6e |0, $A82A|;. {$en|
|00001110| 64 63 7d 0d 20 20 20 20 | 28 2a 20 52 65 71 75 69 |dc}. |(* Requi|
|00001120| 72 65 73 20 49 43 20 31 | 2e 32 2e 0d 20 20 20 20 |res IC 1|.2.. |
|00001130| 20 2a 20 49 74 20 69 73 | 20 69 6c 6c 65 67 61 6c | * It is| illegal|
|00001140| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00001150| 75 74 69 6e 65 20 69 6e | 73 69 64 65 20 61 20 49 |utine in|side a I|
|00001160| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 2e |CBegin/E|nd pair.|
|00001170| 0d 20 20 20 20 20 2a 20 | 52 65 71 75 65 73 74 73 |. * |Requests|
|00001180| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 63 72 65 | the use|r to cre|
|00001190| 61 74 65 20 61 20 6e 65 | 77 20 63 6f 6e 66 69 67 |ate a ne|w config|
|000011a0| 75 72 61 74 69 6f 6e 2c | 20 74 79 70 69 63 61 6c |uration,| typical|
|000011b0| 6c 79 20 75 73 69 6e 67 | 20 73 6f 6d 65 0d 20 20 |ly using| some. |
|000011c0| 20 20 20 2a 20 73 6f 72 | 74 20 6f 66 20 6d 6f 64 | * sor|t of mod|
|000011d0| 61 6c 20 64 69 61 6c 6f | 67 2e 20 49 66 20 74 68 |al dialo|g. If th|
|000011e0| 65 20 75 73 65 72 20 63 | 61 6e 63 65 6c 73 20 74 |e user c|ancels t|
|000011f0| 68 65 20 64 69 61 6c 6f | 67 20 74 68 65 20 63 6f |he dialo|g the co|
|00001200| 6e 66 69 67 75 72 61 74 | 69 6f 6e 0d 20 20 20 20 |nfigurat|ion. |
|00001210| 20 2a 20 73 74 61 74 65 | 20 77 69 6c 6c 20 62 65 | * state| will be|
|00001220| 20 75 6e 61 66 66 65 63 | 74 65 64 2e 0d 20 20 20 | unaffec|ted.. |
|00001230| 20 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 | *). .| functi|
|00001240| 6f 6e 20 49 43 43 47 65 | 74 43 6f 6e 66 69 67 4e |on ICCGe|tConfigN|
|00001250| 61 6d 65 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |ame(inst| : Compo|
|00001260| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 6c 6f |nentInst|ance; lo|
|00001270| 6e 67 6e 61 6d 65 20 3a | 20 42 6f 6f 6c 65 61 6e |ngname :| Boolean|
|00001280| 3b 20 76 61 72 20 6e 61 | 6d 65 20 3a 20 53 74 72 |; var na|me : Str|
|00001290| 32 35 35 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |255) : I|CError;.|
|000012a0| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|000012b0| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|000012c0| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 36 2c 20 |nline $2|F3C, 6, |
|000012d0| 33 35 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 |35, $700|0, $A82A|
|000012e0| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|000012f0| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00001300| 2e 32 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.2.. | * You m|
|00001310| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|00001320| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00001330| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00001340| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00001350| 52 65 74 75 72 6e 73 20 | 61 20 73 74 72 69 6e 67 |Returns |a string|
|00001360| 20 74 68 61 74 20 64 65 | 73 63 72 69 62 65 73 20 | that de|scribes |
|00001370| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 6f 6e 66 |the curr|ent conf|
|00001380| 69 67 75 72 61 74 69 6f | 6e 20 61 74 20 61 20 75 |iguratio|n at a u|
|00001390| 73 65 72 0d 20 20 20 20 | 20 2a 20 6c 65 76 65 6c |ser. | * level|
|000013a0| 2e 20 53 65 74 20 6c 6f | 6e 67 6e 61 6d 65 20 74 |. Set lo|ngname t|
|000013b0| 6f 20 74 72 75 65 20 69 | 66 20 79 6f 75 20 77 61 |o true i|f you wa|
|000013c0| 6e 74 20 61 20 6c 6f 6e | 67 20 6e 61 6d 65 2c 20 |nt a lon|g name, |
|000013d0| 75 70 20 74 6f 20 32 35 | 35 0d 20 20 20 20 20 2a |up to 25|5. *|
|000013e0| 20 63 68 61 72 61 63 74 | 65 72 73 2c 20 6f 72 20 | charact|ers, or |
|000013f0| 66 61 6c 73 65 20 69 66 | 20 79 6f 75 20 77 61 6e |false if| you wan|
|00001400| 74 20 61 20 73 68 6f 72 | 74 20 6e 61 6d 65 2c 20 |t a shor|t name, |
|00001410| 74 79 70 69 63 61 6c 6c | 79 20 61 62 6f 75 74 20 |typicall|y about |
|00001420| 33 32 0d 20 20 20 20 20 | 2a 20 63 68 61 72 61 63 |32. |* charac|
|00001430| 74 65 72 73 2e 0d 20 20 | 20 20 20 2a 20 54 68 65 |ters.. | * The|
|00001440| 20 72 65 74 75 72 6e 65 | 64 20 73 74 72 69 6e 67 | returne|d string|
|00001450| 20 69 73 20 66 6f 72 20 | 75 73 65 72 20 64 69 73 | is for |user dis|
|00001460| 70 6c 61 79 20 6f 6e 6c | 79 2e 20 49 66 20 79 6f |play onl|y. If yo|
|00001470| 75 20 72 65 6c 79 20 6f | 6e 20 74 68 65 0d 20 20 |u rely o|n the. |
|00001480| 20 20 20 2a 20 65 78 61 | 63 74 20 66 6f 72 6d 61 | * exa|ct forma|
|00001490| 74 20 6f 66 20 69 74 2c | 20 79 6f 75 20 77 69 6c |t of it,| you wil|
|000014a0| 6c 20 63 6f 6e 66 6c 69 | 63 74 20 77 69 74 68 20 |l confli|ct with |
|000014b0| 61 6e 79 20 66 75 74 75 | 72 65 20 49 43 0d 20 20 |any futu|re IC. |
|000014c0| 20 20 20 2a 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 | * imp|lementat|
|000014d0| 69 6f 6e 20 74 68 61 74 | 20 64 6f 65 73 6e 27 74 |ion that| doesn't|
|000014e0| 20 75 73 65 20 65 78 70 | 6c 69 63 69 74 20 70 72 | use exp|licit pr|
|000014f0| 65 66 65 72 65 6e 63 65 | 20 66 69 6c 65 73 2e 0d |eference| files..|
|00001500| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00001510| 63 74 69 6f 6e 20 49 43 | 43 47 65 74 43 6f 6e 66 |ction IC|CGetConf|
|00001520| 69 67 52 65 66 65 72 65 | 6e 63 65 28 69 6e 73 74 |igRefere|nce(inst|
|00001530| 20 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 | : Compo|nentInst|
|00001540| 61 6e 63 65 3b 20 72 65 | 66 20 3a 20 49 43 43 6f |ance; re|f : ICCo|
|00001550| 6e 66 69 67 52 65 66 48 | 61 6e 64 6c 65 29 20 3a |nfigRefH|andle) :|
|00001560| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|00001570| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|00001580| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|00001590| 24 32 46 33 43 2c 20 34 | 2c 20 33 31 2c 20 24 37 |$2F3C, 4|, 31, $7|
|000015a0| 30 30 30 2c 20 24 41 38 | 32 41 3b 0d 20 20 7b 24 |000, $A8|2A;. {$|
|000015b0| 65 6e 64 63 7d 0d 20 20 | 20 20 28 2a 20 52 65 71 |endc}. | (* Req|
|000015c0| 75 69 72 65 73 20 49 43 | 20 31 2e 32 2e 0d 20 20 |uires IC| 1.2.. |
|000015d0| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|000015e0| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|000015f0| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00001600| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00001610| 65 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |e.. |* Return|
|00001620| 73 20 61 20 73 65 6c 66 | 2d 63 6f 6e 74 61 69 6e |s a self|-contain|
|00001630| 65 64 20 72 65 66 65 72 | 65 6e 63 65 20 74 6f 20 |ed refer|ence to |
|00001640| 74 68 65 20 69 6e 73 74 | 61 6e 63 65 27 73 20 63 |the inst|ance's c|
|00001650| 75 72 72 65 6e 74 0d 20 | 20 20 20 20 2a 20 63 6f |urrent. | * co|
|00001660| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 0d 20 20 20 |nfigurat|ion.. |
|00001670| 20 20 2a 20 72 65 66 20 | 6d 75 73 74 20 62 65 20 | * ref |must be |
|00001680| 61 20 76 61 6c 69 64 20 | 6e 6f 6e 2d 6e 69 6c 20 |a valid |non-nil |
|00001690| 68 61 6e 64 6c 65 20 61 | 6e 64 20 69 74 20 77 69 |handle a|nd it wi|
|000016a0| 6c 6c 20 62 65 20 72 65 | 73 69 7a 65 64 20 74 6f |ll be re|sized to|
|000016b0| 20 66 69 74 20 74 68 65 | 0d 20 20 20 20 20 2a 20 | fit the|. * |
|000016c0| 72 65 73 75 6c 74 69 6e | 67 20 64 61 74 61 2e 0d |resultin|g data..|
|000016d0| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|000016e0| 63 74 69 6f 6e 20 49 43 | 43 53 65 74 43 6f 6e 66 |ction IC|CSetConf|
|000016f0| 69 67 52 65 66 65 72 65 | 6e 63 65 28 69 6e 73 74 |igRefere|nce(inst|
|00001700| 20 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 | : Compo|nentInst|
|00001710| 61 6e 63 65 3b 20 72 65 | 66 20 3a 20 49 43 43 6f |ance; re|f : ICCo|
|00001720| 6e 66 69 67 52 65 66 48 | 61 6e 64 6c 65 3b 20 66 |nfigRefH|andle; f|
|00001730| 6c 61 67 73 20 3a 20 6c | 6f 6e 67 69 6e 74 29 20 |lags : l|ongint) |
|00001740| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|00001750| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|00001760| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00001770| 20 24 32 46 33 43 2c 20 | 38 2c 20 33 32 2c 20 24 | $2F3C, |8, 32, $|
|00001780| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00001790| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|000017a0| 71 75 69 72 65 73 20 49 | 43 20 31 2e 32 2e 0d 20 |quires I|C 1.2.. |
|000017b0| 20 20 20 20 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | * It| is ille|
|000017c0| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|000017d0| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|000017e0| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|000017f0| 69 72 2e 0d 20 20 20 20 | 20 2a 20 52 65 63 6f 6e |ir.. | * Recon|
|00001800| 66 69 67 75 72 65 73 20 | 74 68 65 20 69 6e 73 74 |figures |the inst|
|00001810| 61 6e 63 65 20 75 73 69 | 6e 67 20 61 20 63 6f 6e |ance usi|ng a con|
|00001820| 66 69 67 75 72 61 74 69 | 6f 6e 20 72 65 66 65 72 |figurati|on refer|
|00001830| 65 6e 63 65 20 74 68 61 | 74 20 77 61 73 0d 20 20 |ence tha|t was. |
|00001840| 20 20 20 2a 20 67 6f 74 | 20 75 73 69 6e 67 20 49 | * got| using I|
|00001850| 43 47 65 74 43 6f 6e 66 | 69 67 52 65 66 65 72 65 |CGetConf|igRefere|
|00001860| 6e 63 65 20 72 65 66 65 | 72 65 6e 63 65 2e 20 53 |nce refe|rence. S|
|00001870| 65 74 20 74 68 65 0d 20 | 20 20 20 20 2a 20 69 63 |et the. | * ic|
|00001880| 4e 6f 55 73 65 72 49 6e | 74 65 72 61 63 74 69 6f |NoUserIn|teractio|
|00001890| 6e 5f 62 69 74 20 69 6e | 20 66 6c 61 67 73 20 69 |n_bit in| flags i|
|000018a0| 66 20 79 6f 75 20 72 65 | 71 75 69 72 65 20 74 68 |f you re|quire th|
|000018b0| 61 74 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 0d |at this |routine.|
|000018c0| 20 20 20 20 20 2a 20 6e | 6f 74 20 70 72 65 73 65 | * n|ot prese|
|000018d0| 6e 74 20 61 20 6d 6f 64 | 61 6c 20 64 69 61 6c 6f |nt a mod|al dialo|
|000018e0| 67 2e 20 4f 74 68 65 72 | 20 66 6c 61 67 20 62 69 |g. Other| flag bi|
|000018f0| 74 73 20 61 72 65 20 72 | 65 73 65 72 76 65 64 20 |ts are r|eserved |
|00001900| 61 6e 64 20 73 68 6f 75 | 6c 64 0d 20 20 20 20 20 |and shou|ld. |
|00001910| 2a 20 62 65 20 73 65 74 | 20 74 6f 20 7a 65 72 6f |* be set| to zero|
|00001920| 2e 0d 20 20 20 20 20 2a | 20 72 65 66 20 6d 75 73 |.. *| ref mus|
|00001930| 74 20 6e 6f 74 20 62 65 | 20 6e 69 6c 2e 0d 20 20 |t not be| nil.. |
|00001940| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00001950| 69 6f 6e 20 49 43 43 53 | 70 65 63 69 66 79 43 6f |ion ICCS|pecifyCo|
|00001960| 6e 66 69 67 46 69 6c 65 | 28 69 6e 73 74 20 3a 20 |nfigFile|(inst : |
|00001970| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|00001980| 65 3b 20 76 61 72 20 63 | 6f 6e 66 69 67 20 3a 20 |e; var c|onfig : |
|00001990| 46 53 53 70 65 63 29 20 | 3a 20 49 43 45 72 72 6f |FSSpec) |: ICErro|
|000019a0| 72 3b 0d 20 20 7b 24 69 | 66 63 20 6e 6f 74 20 47 |r;. {$i|fc not G|
|000019b0| 65 6e 65 72 61 74 69 6e | 67 43 46 4d 7d 0d 20 20 |eneratin|gCFM}. |
|000019c0| 20 20 69 6e 6c 69 6e 65 | 20 24 32 46 33 43 2c 20 | inline| $2F3C, |
|000019d0| 34 2c 20 33 2c 20 24 37 | 30 30 30 2c 20 24 41 38 |4, 3, $7|000, $A8|
|000019e0| 32 41 3b 0d 20 20 7b 24 | 65 6e 64 63 7d 0d 20 20 |2A;. {$|endc}. |
|000019f0| 20 20 28 2a 20 49 74 20 | 69 73 20 69 6c 6c 65 67 | (* It |is illeg|
|00001a00| 61 6c 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |al to ca|ll this |
|00001a10| 72 6f 75 74 69 6e 65 20 | 69 6e 73 69 64 65 20 61 |routine |inside a|
|00001a20| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00001a30| 72 2e 0d 20 20 20 20 20 | 2a 20 46 6f 72 20 75 73 |r.. |* For us|
|00001a40| 65 20 6f 6e 6c 79 20 62 | 79 20 74 68 65 20 49 43 |e only b|y the IC|
|00001a50| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 0d 20 20 | applica|tion.. |
|00001a60| 20 20 20 2a 20 49 66 20 | 79 6f 75 20 63 61 6c 6c | * If |you call|
|00001a70| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 79 6f | this ro|utine yo|
|00001a80| 75 72 73 65 6c 66 2c 20 | 79 6f 75 20 77 69 6c 6c |urself, |you will|
|00001a90| 20 63 6f 6e 66 6c 69 63 | 74 20 77 69 74 68 20 61 | conflic|t with a|
|00001aa0| 6e 79 0d 20 20 20 20 20 | 2a 20 66 75 74 75 72 65 |ny. |* future|
|00001ab0| 20 49 43 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 | IC impl|ementati|
|00001ac0| 6f 6e 20 74 68 61 74 20 | 64 6f 65 73 6e 27 74 20 |on that |doesn't |
|00001ad0| 75 73 65 20 65 78 70 6c | 69 63 69 74 20 70 72 65 |use expl|icit pre|
|00001ae0| 66 65 72 65 6e 63 65 20 | 66 69 6c 65 73 2e 0d 20 |ference |files.. |
|00001af0| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 28 2a 20 2a | *). | . (* *|
|00001b00| 2a 2a 2a 2a 20 47 65 74 | 74 69 6e 67 20 49 6e 66 |**** Get|ting Inf|
|00001b10| 6f 72 6d 61 74 69 6f 6e | 20 2a 2a 2a 2a 2a 20 2a |ormation| ***** *|
|00001b20| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|00001b30| 49 43 43 47 65 74 53 65 | 65 64 28 69 6e 73 74 20 |ICCGetSe|ed(inst |
|00001b40| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |: Compon|entInsta|
|00001b50| 6e 63 65 3b 20 76 61 72 | 20 73 65 65 64 20 3a 20 |nce; var| seed : |
|00001b60| 6c 6f 6e 67 69 6e 74 29 | 20 3a 20 49 43 45 72 72 |longint)| : ICErr|
|00001b70| 6f 72 3b 0d 20 20 7b 24 | 69 66 63 20 6e 6f 74 20 |or;. {$|ifc not |
|00001b80| 47 65 6e 65 72 61 74 69 | 6e 67 43 46 4d 7d 0d 20 |Generati|ngCFM}. |
|00001b90| 20 20 20 69 6e 6c 69 6e | 65 20 24 32 46 33 43 2c | inlin|e $2F3C,|
|00001ba0| 20 34 2c 20 34 2c 20 24 | 37 30 30 30 2c 20 24 41 | 4, 4, $|7000, $A|
|00001bb0| 38 32 41 3b 0d 20 20 7b | 24 65 6e 64 63 7d 0d 20 |82A;. {|$endc}. |
|00001bc0| 20 20 20 28 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | (* Yo|u do not|
|00001bd0| 20 68 61 76 65 20 74 6f | 20 73 70 65 63 69 66 79 | have to| specify|
|00001be0| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00001bf0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00001c00| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00001c10| 20 20 20 2a 20 59 6f 75 | 20 64 6f 20 6e 6f 74 20 | * You| do not |
|00001c20| 68 61 76 65 20 74 6f 20 | 62 65 20 69 6e 73 69 64 |have to |be insid|
|00001c30| 65 20 61 6e 20 49 43 42 | 65 67 69 6e 2f 45 6e 64 |e an ICB|egin/End|
|00001c40| 20 70 61 69 72 20 74 6f | 20 63 61 6c 6c 20 74 68 | pair to| call th|
|00001c50| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00001c60| 20 2a 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 63 | * Retur|ns the c|
|00001c70| 75 72 72 65 6e 74 20 73 | 65 65 64 20 66 6f 72 20 |urrent s|eed for |
|00001c80| 74 68 65 20 49 43 20 70 | 72 65 66 73 20 64 61 74 |the IC p|refs dat|
|00001c90| 61 62 61 73 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 |abase.. | * Th|
|00001ca0| 69 73 20 73 65 65 64 20 | 63 68 61 6e 67 65 73 20 |is seed |changes |
|00001cb0| 65 61 63 68 20 74 69 6d | 65 20 61 20 6e 6f 6e 2d |each tim|e a non-|
|00001cc0| 76 6f 6c 61 74 69 6c 65 | 20 70 72 65 66 65 72 65 |volatile| prefere|
|00001cd0| 6e 63 65 20 69 73 20 63 | 68 61 6e 67 65 64 2e 0d |nce is c|hanged..|
|00001ce0| 20 20 20 20 20 2a 20 59 | 6f 75 20 63 61 6e 20 70 | * Y|ou can p|
|00001cf0| 6f 6c 6c 20 74 68 69 73 | 20 74 6f 20 64 65 74 65 |oll this| to dete|
|00001d00| 72 6d 69 6e 65 20 69 66 | 20 61 6e 79 20 63 61 63 |rmine if| any cac|
|00001d10| 68 65 64 20 70 72 65 66 | 65 72 65 6e 63 65 73 20 |hed pref|erences |
|00001d20| 63 68 61 6e 67 65 2e 0d | 20 20 20 20 20 2a 29 0d |change..| *).|
|00001d30| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00001d40| 43 47 65 74 50 65 72 6d | 28 69 6e 73 74 20 3a 20 |CGetPerm|(inst : |
|00001d50| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|00001d60| 65 3b 20 76 61 72 20 70 | 65 72 6d 20 3a 20 49 43 |e; var p|erm : IC|
|00001d70| 50 65 72 6d 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |Perm) : |ICError;|
|00001d80| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|00001d90| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|00001da0| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 34 2c |inline $|2F3C, 4,|
|00001db0| 20 31 33 2c 20 24 37 30 | 30 30 2c 20 24 41 38 32 | 13, $70|00, $A82|
|00001dc0| 41 3b 0d 20 20 7b 24 65 | 6e 64 63 7d 0d 20 20 20 |A;. {$e|ndc}. |
|00001dd0| 20 28 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | (* You |do not h|
|00001de0| 61 76 65 20 74 6f 20 73 | 70 65 63 69 66 79 20 61 |ave to s|pecify a|
|00001df0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00001e00| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00001e10| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00001e20| 20 2a 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 61 | * Retur|ns the a|
|00001e30| 63 63 65 73 73 20 70 65 | 72 6d 69 73 73 69 6f 6e |ccess pe|rmission|
|00001e40| 73 20 63 75 72 72 65 6e | 74 6c 79 20 61 73 73 6f |s curren|tly asso|
|00001e50| 63 69 61 74 65 64 20 77 | 69 74 68 20 74 68 69 73 |ciated w|ith this|
|00001e60| 20 69 6e 73 74 61 6e 63 | 65 2e 0d 20 20 20 20 20 | instanc|e.. |
|00001e70| 2a 20 57 68 69 6c 65 20 | 61 70 70 6c 69 63 61 74 |* While |applicat|
|00001e80| 69 6f 6e 73 20 6e 6f 72 | 6d 61 6c 6c 79 20 6b 6e |ions nor|mally kn|
|00001e90| 6f 77 20 77 68 61 74 20 | 70 65 72 6d 69 73 73 69 |ow what |permissi|
|00001ea0| 6f 6e 73 20 74 68 65 79 | 20 68 61 76 65 2c 0d 20 |ons they| have,. |
|00001eb0| 20 20 20 20 2a 20 74 68 | 69 73 20 72 6f 75 74 69 | * th|is routi|
|00001ec0| 6e 65 20 69 73 20 64 65 | 73 69 67 6e 65 64 20 66 |ne is de|signed f|
|00001ed0| 6f 72 20 75 73 65 20 62 | 79 20 6f 76 65 72 72 69 |or use b|y overri|
|00001ee0| 64 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2e 0d 20 |de compo|nents.. |
|00001ef0| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00001f00| 74 69 6f 6e 20 49 43 43 | 44 65 66 61 75 6c 74 46 |tion ICC|DefaultF|
|00001f10| 69 6c 65 4e 61 6d 65 28 | 69 6e 73 74 20 3a 20 43 |ileName(|inst : C|
|00001f20| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 73 74 61 6e 63 65 |omponent|Instance|
|00001f30| 3b 20 76 61 72 20 6e 61 | 6d 65 20 3a 20 53 74 72 |; var na|me : Str|
|00001f40| 36 33 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |63) : IC|Error;. |
|00001f50| 20 7b 24 69 66 63 20 6e | 6f 74 20 47 65 6e 65 72 | {$ifc n|ot Gener|
|00001f60| 61 74 69 6e 67 43 46 4d | 7d 0d 20 20 20 20 69 6e |atingCFM|}. in|
|00001f70| 6c 69 6e 65 20 24 32 46 | 33 43 2c 20 34 2c 20 31 |line $2F|3C, 4, 1|
|00001f80| 31 2c 20 24 37 30 30 30 | 2c 20 24 41 38 32 41 3b |1, $7000|, $A82A;|
|00001f90| 0d 20 20 7b 24 65 6e 64 | 63 7d 0d 20 20 20 20 28 |. {$end|c}. (|
|00001fa0| 2a 20 59 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |* You do| not hav|
|00001fb0| 65 20 74 6f 20 73 70 65 | 63 69 66 79 20 61 20 63 |e to spe|cify a c|
|00001fc0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00001fd0| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00001fe0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00001ff0| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00002000| 20 74 6f 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e | to be i|nside an|
|00002010| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00002020| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|00002030| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 52 |outine..| * R|
|00002040| 65 74 75 72 6e 73 20 74 | 68 65 20 64 65 66 61 75 |eturns t|he defau|
|00002050| 6c 74 20 66 69 6c 65 20 | 6e 61 6d 65 20 66 6f 72 |lt file |name for|
|00002060| 20 49 43 20 70 72 65 66 | 65 72 65 6e 63 65 20 66 | IC pref|erence f|
|00002070| 69 6c 65 73 2e 0d 20 20 | 20 20 20 2a 20 41 70 70 |iles.. | * App|
|00002080| 6c 69 63 61 74 69 6f 6e | 73 20 73 68 6f 75 6c 64 |lication|s should|
|00002090| 20 6e 65 76 65 72 20 6e | 65 65 64 20 74 6f 20 63 | never n|eed to c|
|000020a0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|000020b0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|000020c0| 72 65 6c 79 20 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |rely on |informat|
|000020d0| 69 6f 6e 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |ion retu|rned by |
|000020e0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 79 6f 75 |this rou|tine you|
|000020f0| 72 73 65 6c 66 2c 0d 20 | 20 20 20 20 2a 20 79 6f |rself,. | * yo|
|00002100| 75 20 6d 61 79 20 63 6f | 6e 66 6c 69 63 74 20 77 |u may co|nflict w|
|00002110| 69 74 68 20 61 6e 79 20 | 66 75 74 75 72 65 20 49 |ith any |future I|
|00002120| 43 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |C implem|entation|
|00002130| 20 74 68 61 74 20 64 6f | 65 73 6e 27 74 20 75 73 | that do|esn't us|
|00002140| 65 0d 20 20 20 20 20 2a | 20 65 78 70 6c 69 63 69 |e. *| explici|
|00002150| 74 20 70 72 65 66 65 72 | 65 6e 63 65 20 66 69 6c |t prefer|ence fil|
|00002160| 65 73 2e 0d 20 20 20 20 | 20 2a 20 54 68 65 20 63 |es.. | * The c|
|00002170| 6f 6d 70 6f 6e 65 6e 74 | 20 63 61 6c 6c 73 20 74 |omponent| calls t|
|00002180| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 74 6f 20 73 |his rout|ine to s|
|00002190| 65 74 20 75 70 20 74 68 | 65 20 64 65 66 61 75 6c |et up th|e defaul|
|000021a0| 74 20 49 43 20 66 69 6c | 65 20 6e 61 6d 65 2e 0d |t IC fil|e name..|
|000021b0| 20 20 20 20 20 2a 20 54 | 68 69 73 20 61 6c 6c 6f | * T|his allo|
|000021c0| 77 73 20 74 68 69 73 20 | 6f 70 65 72 61 74 69 6f |ws this |operatio|
|000021d0| 6e 20 74 6f 20 62 65 20 | 69 6e 74 65 72 63 65 70 |n to be |intercep|
|000021e0| 74 65 64 20 62 79 20 61 | 20 63 6f 6d 70 6f 6e 65 |ted by a| compone|
|000021f0| 6e 74 20 74 68 61 74 20 | 68 61 73 0d 20 20 20 20 |nt that |has. |
|00002200| 20 2a 20 63 61 70 74 75 | 72 65 64 20 75 73 2e 20 | * captu|red us. |
|00002210| 49 74 20 63 75 72 72 65 | 6e 74 6c 79 20 67 65 74 |It curre|ntly get|
|00002220| 73 20 69 74 20 66 72 6f | 6d 20 74 68 65 20 63 6f |s it fro|m the co|
|00002230| 6d 70 6f 6e 65 6e 74 20 | 72 65 73 6f 75 72 63 65 |mponent |resource|
|00002240| 20 66 69 6c 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 | file.. | * Th|
|00002250| 65 20 67 6c 75 65 20 76 | 65 72 73 69 6f 6e 20 69 |e glue v|ersion i|
|00002260| 73 20 68 61 72 64 77 69 | 72 65 64 20 74 6f 20 22 |s hardwi|red to "|
|00002270| 49 6e 74 65 72 6e 65 74 | 20 50 72 65 66 65 72 65 |Internet| Prefere|
|00002280| 6e 63 65 73 22 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |nces".. | *). |
|00002290| 20 0d 20 20 28 2a 20 2a | 2a 2a 2a 2a 20 52 65 61 | . (* *|**** Rea|
|000022a0| 64 69 6e 67 20 61 6e 64 | 20 57 72 69 74 69 6e 67 |ding and| Writing|
|000022b0| 20 50 72 65 66 65 72 65 | 6e 63 65 73 20 2a 2a 2a | Prefere|nces ***|
|000022c0| 2a 2a 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 |** *). |. funct|
|000022d0| 69 6f 6e 20 49 43 43 42 | 65 67 69 6e 28 69 6e 73 |ion ICCB|egin(ins|
|000022e0| 74 20 3a 20 43 6f 6d 70 | 6f 6e 65 6e 74 49 6e 73 |t : Comp|onentIns|
|000022f0| 74 61 6e 63 65 3b 20 70 | 65 72 6d 20 3a 20 49 43 |tance; p|erm : IC|
|00002300| 50 65 72 6d 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |Perm) : |ICError;|
|00002310| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|00002320| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|00002330| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 32 2c |inline $|2F3C, 2,|
|00002340| 20 35 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 | 5, $700|0, $A82A|
|00002350| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|00002360| 28 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 |(* You m|ust spec|
|00002370| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00002380| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00002390| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|000023a0| 0d 20 20 20 20 20 2a 20 | 49 74 20 69 73 20 69 6c |. * |It is il|
|000023b0| 6c 65 67 61 6c 20 74 6f | 20 63 61 6c 6c 20 74 68 |legal to| call th|
|000023c0| 69 73 20 72 6f 75 74 69 | 6e 65 20 69 6e 73 69 64 |is routi|ne insid|
|000023d0| 65 20 61 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 |e a ICBe|gin/End |
|000023e0| 70 61 69 72 2e 0d 20 20 | 20 20 20 2a 20 53 74 61 |pair.. | * Sta|
|000023f0| 72 74 69 6e 67 20 72 65 | 61 64 69 6e 67 20 6f 72 |rting re|ading or|
|00002400| 20 77 72 69 74 69 6e 67 | 20 6d 75 6c 74 69 70 6c | writing| multipl|
|00002410| 65 20 70 72 65 66 65 72 | 65 6e 63 65 73 2e 0d 20 |e prefer|ences.. |
|00002420| 20 20 20 20 2a 20 41 20 | 63 61 6c 6c 20 74 6f 20 | * A |call to |
|00002430| 74 68 69 73 20 6d 75 73 | 74 20 62 65 20 62 61 6c |this mus|t be bal|
|00002440| 61 6e 63 65 64 20 62 79 | 20 61 20 63 61 6c 6c 20 |anced by| a call |
|00002450| 74 6f 20 49 43 45 6e 64 | 2e 0d 20 20 20 20 20 2a |to ICEnd|.. *|
|00002460| 20 44 6f 20 6e 6f 74 20 | 63 61 6c 6c 20 57 61 69 | Do not |call Wai|
|00002470| 74 4e 65 78 74 45 76 65 | 6e 74 20 62 65 74 77 65 |tNextEve|nt betwe|
|00002480| 65 6e 20 74 68 65 73 65 | 20 63 61 6c 6c 73 2e 0d |en these| calls..|
|00002490| 20 20 20 20 20 2a 20 54 | 68 65 20 70 65 72 6d 20 | * T|he perm |
|000024a0| 73 70 65 63 69 66 69 65 | 73 20 77 68 65 74 68 65 |specifie|s whethe|
|000024b0| 72 20 79 6f 75 20 69 6e | 74 65 6e 64 20 74 6f 20 |r you in|tend to |
|000024c0| 72 65 61 64 20 6f 72 20 | 72 65 61 64 2f 77 72 69 |read or |read/wri|
|000024d0| 74 65 2e 0d 20 20 20 20 | 20 2a 20 4f 6e 6c 79 20 |te.. | * Only |
|000024e0| 6f 6e 65 20 77 72 69 74 | 65 72 20 69 73 20 61 6c |one writ|er is al|
|000024f0| 6c 6f 77 65 64 20 70 65 | 72 20 69 6e 73 74 61 6e |lowed pe|r instan|
|00002500| 63 65 2e 0d 20 20 20 20 | 20 2a 20 4e 6f 74 65 20 |ce.. | * Note |
|00002510| 74 68 61 74 20 74 68 69 | 73 20 6d 61 79 20 6f 70 |that thi|s may op|
|00002520| 65 6e 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 |en resou|rce file|
|00002530| 73 20 74 68 61 74 20 61 | 72 65 20 6e 6f 74 20 63 |s that a|re not c|
|00002540| 6c 6f 73 65 64 0d 20 20 | 20 20 20 2a 20 75 6e 74 |losed. | * unt|
|00002550| 69 6c 20 79 6f 75 20 63 | 61 6c 6c 20 49 43 45 6e |il you c|all ICEn|
|00002560| 64 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |d.. |*). . |
|00002570| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 47 65 74 50 |function| ICCGetP|
|00002580| 72 65 66 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |ref(inst| : Compo|
|00002590| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 6b 65 |nentInst|ance; ke|
|000025a0| 79 20 3a 20 53 74 72 32 | 35 35 3b 20 76 61 72 20 |y : Str2|55; var |
|000025b0| 61 74 74 72 20 3a 20 49 | 43 41 74 74 72 3b 20 62 |attr : I|CAttr; b|
|000025c0| 75 66 20 3a 20 50 74 72 | 3b 20 76 61 72 20 73 69 |uf : Ptr|; var si|
|000025d0| 7a 65 20 3a 20 6c 6f 6e | 67 69 6e 74 29 20 3a 20 |ze : lon|gint) : |
|000025e0| 49 43 45 72 72 6f 72 3b | 0d 20 20 7b 24 69 66 63 |ICError;|. {$ifc|
|000025f0| 20 6e 6f 74 20 47 65 6e | 65 72 61 74 69 6e 67 43 | not Gen|eratingC|
|00002600| 46 4d 7d 0d 20 20 20 20 | 69 6e 6c 69 6e 65 20 24 |FM}. |inline $|
|00002610| 32 46 33 43 2c 20 31 36 | 2c 20 36 2c 20 24 37 30 |2F3C, 16|, 6, $70|
|00002620| 30 30 2c 20 24 41 38 32 | 41 3b 0d 20 20 7b 24 65 |00, $A82|A;. {$e|
|00002630| 6e 64 63 7d 0d 20 20 20 | 20 28 2a 20 59 6f 75 20 |ndc}. | (* You |
|00002640| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00002650| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00002660| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00002670| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00002680| 20 49 66 20 79 6f 75 20 | 61 72 65 20 67 65 74 74 | If you |are gett|
|00002690| 69 6e 67 20 6f 72 20 73 | 65 74 74 69 6e 67 20 6d |ing or s|etting m|
|000026a0| 75 6c 74 69 70 6c 65 20 | 70 72 65 66 65 72 65 6e |ultiple |preferen|
|000026b0| 63 65 73 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ces, you| should |
|000026c0| 70 6c 61 63 65 0d 20 20 | 20 20 20 2a 20 74 68 65 |place. | * the|
|000026d0| 73 65 20 63 61 6c 6c 73 | 20 77 69 74 68 69 6e 20 |se calls| within |
|000026e0| 61 6e 20 49 43 42 65 67 | 69 6e 2f 49 43 45 6e 64 |an ICBeg|in/ICEnd|
|000026f0| 20 70 61 69 72 2e 0d 20 | 20 20 20 20 2a 20 49 66 | pair.. | * If|
|00002700| 20 79 6f 75 20 63 61 6c | 6c 20 74 68 69 73 20 72 | you cal|l this r|
|00002710| 6f 75 74 69 6e 65 20 6f | 75 74 73 69 64 65 20 6f |outine o|utside o|
|00002720| 66 20 73 75 63 68 20 61 | 20 70 61 69 72 2c 20 69 |f such a| pair, i|
|00002730| 74 20 69 6d 70 6c 69 63 | 69 74 6c 79 0d 20 20 20 |t implic|itly. |
|00002740| 20 20 2a 20 63 61 6c 6c | 73 20 49 43 42 65 67 69 | * call|s ICBegi|
|00002750| 6e 28 69 6e 73 74 2c 20 | 69 63 52 65 61 64 4f 6e |n(inst, |icReadOn|
|00002760| 6c 79 50 65 72 6d 29 2e | 0d 20 20 20 20 20 2a 20 |lyPerm).|. * |
|00002770| 52 65 61 64 73 20 74 68 | 65 20 70 72 65 66 65 72 |Reads th|e prefer|
|00002780| 65 6e 63 65 20 73 70 65 | 63 69 66 69 65 64 20 62 |ence spe|cified b|
|00002790| 79 20 6b 65 79 20 66 72 | 6f 6d 20 74 68 65 20 49 |y key fr|om the I|
|000027a0| 43 20 64 61 74 61 62 61 | 73 65 20 74 6f 20 74 68 |C databa|se to th|
|000027b0| 65 0d 20 20 20 20 20 2a | 20 62 75 66 66 65 72 20 |e. *| buffer |
|000027c0| 70 6f 69 6e 74 65 64 20 | 74 6f 20 62 79 20 62 75 |pointed |to by bu|
|000027d0| 66 20 61 6e 64 20 73 69 | 7a 65 2e 0d 20 20 20 20 |f and si|ze.. |
|000027e0| 20 2a 20 6b 65 79 20 6d | 75 73 74 20 6e 6f 74 20 | * key m|ust not |
|000027f0| 62 65 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 |be the e|mpty str|
|00002800| 69 6e 67 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 62 |ing.. | * If b|
|00002810| 75 66 20 69 73 20 6e 69 | 6c 20 74 68 65 6e 20 6e |uf is ni|l then n|
|00002820| 6f 20 64 61 74 61 20 69 | 73 20 72 65 74 75 72 6e |o data i|s return|
|00002830| 65 64 2e 0d 20 20 20 20 | 20 2a 20 73 69 7a 65 20 |ed.. | * size |
|00002840| 6d 75 73 74 20 62 65 20 | 6e 6f 6e 2d 6e 65 67 61 |must be |non-nega|
|00002850| 74 69 76 65 2e 0d 20 20 | 20 20 20 2a 20 61 74 74 |tive.. | * att|
|00002860| 72 20 61 6e 64 20 73 69 | 7a 65 20 61 72 65 20 61 |r and si|ze are a|
|00002870| 6c 77 61 79 73 20 73 65 | 74 20 6f 6e 20 72 65 74 |lways se|t on ret|
|00002880| 75 72 6e 2e 20 4f 6e 20 | 65 72 72 6f 72 73 20 28 |urn. On |errors (|
|00002890| 65 78 63 65 70 74 20 69 | 63 54 72 75 6e 63 61 74 |except i|cTruncat|
|000028a0| 65 64 45 72 72 29 0d 20 | 20 20 20 20 2a 20 61 74 |edErr). | * at|
|000028b0| 74 72 20 69 73 20 73 65 | 74 20 74 6f 20 49 43 61 |tr is se|t to ICa|
|000028c0| 74 74 72 5f 6e 6f 5f 63 | 68 61 6e 67 65 20 61 6e |ttr_no_c|hange an|
|000028d0| 64 20 73 69 7a 65 20 69 | 73 20 73 65 74 20 74 6f |d size i|s set to|
|000028e0| 20 30 2e 0d 20 20 20 20 | 20 2a 20 73 69 7a 65 20 | 0.. | * size |
|000028f0| 69 73 20 74 68 65 20 61 | 63 74 75 61 6c 20 73 69 |is the a|ctual si|
|00002900| 7a 65 20 6f 66 20 74 68 | 65 20 64 61 74 61 2e 0d |ze of th|e data..|
|00002910| 20 20 20 20 20 2a 20 61 | 74 74 72 20 69 73 20 73 | * a|ttr is s|
|00002920| 65 74 20 74 6f 20 74 68 | 65 20 61 74 74 72 69 62 |et to th|e attrib|
|00002930| 75 74 65 73 20 61 73 73 | 6f 63 69 61 74 65 64 20 |utes ass|ociated |
|00002940| 77 69 74 68 20 74 68 65 | 20 70 72 65 66 65 72 65 |with the| prefere|
|00002950| 6e 63 65 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 74 |nce.. | * If t|
|00002960| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 72 65 74 75 |his rout|ine retu|
|00002970| 72 6e 73 20 69 63 54 72 | 75 6e 63 61 74 65 64 45 |rns icTr|uncatedE|
|00002980| 72 72 20 74 68 65 6e 20 | 74 68 65 20 6f 74 68 65 |rr then |the othe|
|00002990| 72 20 72 65 74 75 72 6e | 65 64 0d 20 20 20 20 20 |r return|ed. |
|000029a0| 2a 20 76 61 6c 75 65 73 | 20 61 72 65 20 76 61 6c |* values| are val|
|000029b0| 69 64 20 65 78 63 65 70 | 74 20 74 68 61 74 20 6f |id excep|t that o|
|000029c0| 6e 6c 79 20 74 68 65 20 | 66 69 72 73 74 20 73 69 |nly the |first si|
|000029d0| 7a 65 20 62 79 74 65 73 | 20 68 61 76 65 20 62 65 |ze bytes| have be|
|000029e0| 65 6e 0d 20 20 20 20 20 | 2a 20 72 65 74 75 72 6e |en. |* return|
|000029f0| 2e 20 73 69 7a 65 20 69 | 73 20 61 64 6a 75 73 74 |. size i|s adjust|
|00002a00| 65 64 20 74 6f 20 72 65 | 66 6c 65 63 74 20 74 68 |ed to re|flect th|
|00002a10| 65 20 74 72 75 65 20 73 | 69 7a 65 20 6f 66 20 74 |e true s|ize of t|
|00002a20| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 2e 0d 20 |he prefe|rence.. |
|00002a30| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|00002a40| 50 72 65 66 4e 6f 74 46 | 6f 75 6e 64 20 69 66 20 |PrefNotF|ound if |
|00002a50| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 70 72 65 66 |there is| no pref|
|00002a60| 65 72 65 6e 63 65 20 66 | 6f 72 20 74 68 65 20 6b |erence f|or the k|
|00002a70| 65 79 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |ey.. | *). . |
|00002a80| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 43 53 65 74 | functio|n ICCSet|
|00002a90| 50 72 65 66 28 69 6e 73 | 74 20 3a 20 43 6f 6d 70 |Pref(ins|t : Comp|
|00002aa0| 6f 6e 65 6e 74 49 6e 73 | 74 61 6e 63 65 3b 20 6b |onentIns|tance; k|
|00002ab0| 65 79 20 3a 20 53 74 72 | 32 35 35 3b 20 61 74 74 |ey : Str|255; att|
|00002ac0| 72 20 3a 20 49 43 41 74 | 74 72 3b 20 62 75 66 20 |r : ICAt|tr; buf |
|00002ad0| 3a 20 50 74 72 3b 20 73 | 69 7a 65 20 3a 20 6c 6f |: Ptr; s|ize : lo|
|00002ae0| 6e 67 69 6e 74 29 20 3a | 20 49 43 45 72 72 6f 72 |ngint) :| ICError|
|00002af0| 3b 0d 20 20 7b 24 69 66 | 63 20 6e 6f 74 20 47 65 |;. {$if|c not Ge|
|00002b00| 6e 65 72 61 74 69 6e 67 | 43 46 4d 7d 0d 20 20 20 |nerating|CFM}. |
|00002b10| 20 69 6e 6c 69 6e 65 20 | 24 32 46 33 43 2c 20 31 | inline |$2F3C, 1|
|00002b20| 36 2c 20 37 2c 20 24 37 | 30 30 30 2c 20 24 41 38 |6, 7, $7|000, $A8|
|00002b30| 32 41 3b 0d 20 20 7b 24 | 65 6e 64 63 7d 0d 20 20 |2A;. {$|endc}. |
|00002b40| 20 20 28 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | (* You| must sp|
|00002b50| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00002b60| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00002b70| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00002b80| 65 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 79 6f 75 |e.. |* If you|
|00002b90| 20 61 72 65 20 67 65 74 | 74 69 6e 67 20 6f 72 20 | are get|ting or |
|00002ba0| 73 65 74 74 69 6e 67 20 | 6d 75 6c 74 69 70 6c 65 |setting |multiple|
|00002bb0| 20 70 72 65 66 65 72 65 | 6e 63 65 73 2c 20 79 6f | prefere|nces, yo|
|00002bc0| 75 20 73 68 6f 75 6c 64 | 20 70 6c 61 63 65 0d 20 |u should| place. |
|00002bd0| 20 20 20 20 2a 20 74 68 | 65 73 65 20 63 61 6c 6c | * th|ese call|
|00002be0| 73 20 77 69 74 68 69 6e | 20 61 6e 20 49 43 42 65 |s within| an ICBe|
|00002bf0| 67 69 6e 2f 49 43 45 6e | 64 20 70 61 69 72 2e 0d |gin/ICEn|d pair..|
|00002c00| 20 20 20 20 20 2a 20 49 | 66 20 79 6f 75 20 63 61 | * I|f you ca|
|00002c10| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00002c20| 6f 75 74 73 69 64 65 20 | 6f 66 20 73 75 63 68 20 |outside |of such |
|00002c30| 61 20 70 61 69 72 2c 20 | 69 74 20 69 6d 70 6c 69 |a pair, |it impli|
|00002c40| 63 69 74 6c 79 0d 20 20 | 20 20 20 2a 20 63 61 6c |citly. | * cal|
|00002c50| 6c 73 20 49 43 42 65 67 | 69 6e 28 69 6e 73 74 2c |ls ICBeg|in(inst,|
|00002c60| 20 69 63 52 65 61 64 57 | 72 69 74 65 50 65 72 6d | icReadW|ritePerm|
|00002c70| 29 2e 0d 20 20 20 20 20 | 2a 20 53 65 74 73 20 74 |).. |* Sets t|
|00002c80| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 73 70 |he prefe|rence sp|
|00002c90| 65 63 69 66 69 65 64 20 | 62 79 20 6b 65 79 20 66 |ecified |by key f|
|00002ca0| 72 6f 6d 20 74 68 65 20 | 49 43 20 64 61 74 61 62 |rom the |IC datab|
|00002cb0| 61 73 65 20 74 6f 20 74 | 68 65 0d 20 20 20 20 20 |ase to t|he. |
|00002cc0| 2a 20 76 61 6c 75 65 20 | 70 6f 69 6e 74 65 64 20 |* value |pointed |
|00002cd0| 74 6f 20 62 79 20 62 75 | 66 20 61 6e 64 20 73 69 |to by bu|f and si|
|00002ce0| 7a 65 2e 0d 20 20 20 20 | 20 2a 20 6b 65 79 20 6d |ze.. | * key m|
|00002cf0| 75 73 74 20 6e 6f 74 20 | 62 65 20 74 68 65 20 65 |ust not |be the e|
|00002d00| 6d 70 74 79 20 73 74 72 | 69 6e 67 2e 0d 20 20 20 |mpty str|ing.. |
|00002d10| 20 20 2a 20 73 69 7a 65 | 20 6d 75 73 74 20 62 65 | * size| must be|
|00002d20| 20 6e 6f 6e 2d 6e 65 67 | 61 74 69 76 65 2e 20 0d | non-neg|ative. .|
|00002d30| 20 20 20 20 20 2a 20 49 | 66 20 62 75 66 20 69 73 | * I|f buf is|
|00002d40| 20 6e 69 6c 20 74 68 65 | 6e 20 74 68 65 20 70 72 | nil the|n the pr|
|00002d50| 65 66 65 72 65 6e 63 65 | 20 76 61 6c 75 65 20 69 |eference| value i|
|00002d60| 73 20 6e 6f 74 20 73 65 | 74 20 61 6e 64 20 73 69 |s not se|t and si|
|00002d70| 7a 65 20 69 73 20 69 67 | 6e 6f 72 65 64 2e 0d 20 |ze is ig|nored.. |
|00002d80| 20 20 20 20 2a 20 49 66 | 20 62 75 66 20 69 73 20 | * If| buf is |
|00002d90| 6e 6f 74 20 6e 69 6c 20 | 74 68 65 6e 20 74 68 65 |not nil |then the|
|00002da0| 20 70 72 65 66 65 72 65 | 6e 63 65 20 76 61 6c 75 | prefere|nce valu|
|00002db0| 65 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |e is set| to the |
|00002dc0| 73 69 7a 65 0d 20 20 20 | 20 20 2a 20 62 79 74 65 |size. | * byte|
|00002dd0| 73 20 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 |s pointe|d to by |
|00002de0| 62 75 66 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 61 |buf.. | * If a|
|00002df0| 74 74 72 20 69 73 20 49 | 43 61 74 74 72 5f 6e 6f |ttr is I|Cattr_no|
|00002e00| 5f 63 68 61 6e 67 65 20 | 74 68 65 6e 20 74 68 65 |_change |then the|
|00002e10| 20 70 72 65 66 65 72 65 | 6e 63 65 20 61 74 74 72 | prefere|nce attr|
|00002e20| 69 62 75 74 65 73 20 61 | 72 65 20 6e 6f 74 20 73 |ibutes a|re not s|
|00002e30| 65 74 2e 0d 20 20 20 20 | 20 2a 20 4f 74 68 65 72 |et.. | * Other|
|00002e40| 77 69 73 65 20 74 68 65 | 20 70 72 65 66 65 72 65 |wise the| prefere|
|00002e50| 6e 63 65 20 61 74 74 72 | 69 62 75 74 65 73 20 61 |nce attr|ibutes a|
|00002e60| 72 65 20 73 65 74 20 74 | 6f 20 61 74 74 72 2e 0d |re set t|o attr..|
|00002e70| 20 20 20 20 20 2a 20 52 | 65 74 75 72 6e 73 20 69 | * R|eturns i|
|00002e80| 63 50 65 72 6d 45 72 72 | 20 69 66 20 74 68 65 20 |cPermErr| if the |
|00002e90| 70 72 65 76 69 6f 75 73 | 20 49 43 42 65 67 69 6e |previous| ICBegin|
|00002ea0| 20 77 61 73 20 70 61 73 | 73 65 64 20 69 63 52 65 | was pas|sed icRe|
|00002eb0| 61 64 4f 6e 6c 79 50 65 | 72 6d 2e 0d 20 20 20 20 |adOnlyPe|rm.. |
|00002ec0| 20 2a 20 52 65 74 75 72 | 6e 73 20 69 63 50 65 72 | * Retur|ns icPer|
|00002ed0| 6d 45 72 72 20 69 66 20 | 63 75 72 72 65 6e 74 20 |mErr if |current |
|00002ee0| 61 74 74 72 20 69 73 20 | 6c 6f 63 6b 65 64 2c 20 |attr is |locked, |
|00002ef0| 6e 65 77 20 61 74 74 72 | 20 69 73 20 6c 6f 63 6b |new attr| is lock|
|00002f00| 65 64 20 61 6e 64 20 62 | 75 66 20 3c 3e 20 6e 69 |ed and b|uf <> ni|
|00002f10| 6c 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |l.. |*). . |
|00002f20| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 46 69 6e 64 |function| ICCFind|
|00002f30| 50 72 65 66 48 61 6e 64 | 6c 65 28 69 6e 73 74 20 |PrefHand|le(inst |
|00002f40| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |: Compon|entInsta|
|00002f50| 6e 63 65 3b 20 6b 65 79 | 20 3a 20 53 74 72 32 35 |nce; key| : Str25|
|00002f60| 35 3b 20 76 61 72 20 61 | 74 74 72 20 3a 20 49 43 |5; var a|ttr : IC|
|00002f70| 41 74 74 72 3b 20 70 72 | 65 66 68 20 3a 20 48 61 |Attr; pr|efh : Ha|
|00002f80| 6e 64 6c 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ndle) : |ICError;|
|00002f90| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|00002fa0| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|00002fb0| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 31 32 |inline $|2F3C, 12|
|00002fc0| 2c 20 33 36 2c 20 24 37 | 30 30 30 2c 20 24 41 38 |, 36, $7|000, $A8|
|00002fd0| 32 41 3b 0d 20 20 7b 24 | 65 6e 64 63 7d 0d 20 20 |2A;. {$|endc}. |
|00002fe0| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00002ff0| 20 31 2e 32 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 | 1.2.. | * You|
|00003000| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00003010| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00003020| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00003030| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00003040| 2a 20 49 66 20 79 6f 75 | 20 61 72 65 20 67 65 74 |* If you| are get|
|00003050| 74 69 6e 67 20 6f 72 20 | 73 65 74 74 69 6e 67 20 |ting or |setting |
|00003060| 6d 75 6c 74 69 70 6c 65 | 20 70 72 65 66 65 72 65 |multiple| prefere|
|00003070| 6e 63 65 73 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |nces, yo|u should|
|00003080| 20 70 6c 61 63 65 0d 20 | 20 20 20 20 2a 20 74 68 | place. | * th|
|00003090| 65 73 65 20 63 61 6c 6c | 73 20 77 69 74 68 69 6e |ese call|s within|
|000030a0| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 49 43 45 6e | an ICBe|gin/ICEn|
|000030b0| 64 20 70 61 69 72 2e 0d | 20 20 20 20 20 2a 20 49 |d pair..| * I|
|000030c0| 66 20 79 6f 75 20 63 61 | 6c 6c 20 74 68 69 73 20 |f you ca|ll this |
|000030d0| 72 6f 75 74 69 6e 65 20 | 6f 75 74 73 69 64 65 20 |routine |outside |
|000030e0| 6f 66 20 73 75 63 68 20 | 61 20 70 61 69 72 2c 20 |of such |a pair, |
|000030f0| 69 74 20 69 6d 70 6c 69 | 63 69 74 6c 79 0d 20 20 |it impli|citly. |
|00003100| 20 20 20 2a 20 63 61 6c | 6c 73 20 49 43 42 65 67 | * cal|ls ICBeg|
|00003110| 69 6e 28 69 6e 73 74 2c | 20 69 63 52 65 61 64 57 |in(inst,| icReadW|
|00003120| 72 69 74 65 50 65 72 6d | 29 2e 0d 20 20 20 20 20 |ritePerm|).. |
|00003130| 2a 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 65 |* This r|outine e|
|00003140| 66 66 65 63 74 69 76 65 | 6c 79 20 72 65 70 6c 61 |ffective|ly repla|
|00003150| 63 65 73 20 49 43 47 65 | 74 50 72 65 66 48 61 6e |ces ICGe|tPrefHan|
|00003160| 64 6c 65 2e 0d 20 20 20 | 20 20 2a 20 52 65 61 64 |dle.. | * Read|
|00003170| 73 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |s the pr|eference|
|00003180| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 6b 65 | specifi|ed by ke|
|00003190| 79 20 66 72 6f 6d 20 74 | 68 65 20 49 43 20 64 61 |y from t|he IC da|
|000031a0| 74 61 62 61 73 65 20 69 | 6e 74 6f 0d 20 20 20 20 |tabase i|nto. |
|000031b0| 20 2a 20 61 20 68 61 6e | 64 6c 65 2c 20 70 72 65 | * a han|dle, pre|
|000031c0| 66 68 2e 0d 20 20 20 20 | 20 2a 20 6b 65 79 20 6d |fh.. | * key m|
|000031d0| 75 73 74 20 6e 6f 74 20 | 62 65 20 74 68 65 20 65 |ust not |be the e|
|000031e0| 6d 70 74 79 20 73 74 72 | 69 6e 67 2e 0d 20 20 20 |mpty str|ing.. |
|000031f0| 20 20 2a 20 61 74 74 72 | 20 69 73 20 73 65 74 20 | * attr| is set |
|00003200| 74 6f 20 74 68 65 20 61 | 74 74 72 69 62 75 74 65 |to the a|ttribute|
|00003210| 73 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |s associ|ated wit|
|00003220| 68 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |h the pr|eference|
|00003230| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.. *| You mus|
|00003240| 74 20 73 65 74 20 70 72 | 65 66 68 20 74 6f 20 61 |t set pr|efh to a|
|00003250| 20 6e 6f 6e 2d 6e 69 6c | 20 68 61 6e 64 6c 65 20 | non-nil| handle |
|00003260| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|00003270| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00003280| 20 20 2a 20 49 66 20 74 | 68 65 20 70 72 65 66 65 | * If t|he prefe|
|00003290| 72 65 6e 63 65 20 64 6f | 65 73 20 6e 6f 74 20 65 |rence do|es not e|
|000032a0| 78 69 73 74 2c 20 69 63 | 50 72 65 66 4e 6f 74 46 |xist, ic|PrefNotF|
|000032b0| 6f 75 6e 64 45 72 72 20 | 69 73 20 72 65 74 75 72 |oundErr |is retur|
|000032c0| 6e 65 64 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d |ned.. | *). .|
|000032d0| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 43 47 65 | functi|on ICCGe|
|000032e0| 74 50 72 65 66 48 61 6e | 64 6c 65 28 69 6e 73 74 |tPrefHan|dle(inst|
|000032f0| 20 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 | : Compo|nentInst|
|00003300| 61 6e 63 65 3b 20 6b 65 | 79 20 3a 20 53 74 72 32 |ance; ke|y : Str2|
|00003310| 35 35 3b 20 76 61 72 20 | 61 74 74 72 20 3a 20 49 |55; var |attr : I|
|00003320| 43 41 74 74 72 3b 20 76 | 61 72 20 70 72 65 66 68 |CAttr; v|ar prefh|
|00003330| 20 3a 20 48 61 6e 64 6c | 65 29 20 3a 20 49 43 45 | : Handl|e) : ICE|
|00003340| 72 72 6f 72 3b 0d 20 20 | 7b 24 69 66 63 20 6e 6f |rror;. |{$ifc no|
|00003350| 74 20 47 65 6e 65 72 61 | 74 69 6e 67 43 46 4d 7d |t Genera|tingCFM}|
|00003360| 0d 20 20 20 20 69 6e 6c | 69 6e 65 20 24 32 46 33 |. inl|ine $2F3|
|00003370| 43 2c 20 31 32 2c 20 32 | 36 2c 20 24 37 30 30 30 |C, 12, 2|6, $7000|
|00003380| 2c 20 24 41 38 32 41 3b | 0d 20 20 7b 24 65 6e 64 |, $A82A;|. {$end|
|00003390| 63 7d 0d 20 20 20 20 28 | 2a 20 52 65 71 75 69 72 |c}. (|* Requir|
|000033a0| 65 73 20 49 43 20 31 2e | 31 2e 0d 20 20 20 20 20 |es IC 1.|1.. |
|000033b0| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|000033c0| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|000033d0| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|000033e0| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|000033f0| 20 20 20 20 20 2a 20 49 | 66 20 79 6f 75 20 61 72 | * I|f you ar|
|00003400| 65 20 67 65 74 74 69 6e | 67 20 6f 72 20 73 65 74 |e gettin|g or set|
|00003410| 74 69 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 70 72 |ting mul|tiple pr|
|00003420| 65 66 65 72 65 6e 63 65 | 73 2c 20 79 6f 75 20 73 |eference|s, you s|
|00003430| 68 6f 75 6c 64 20 70 6c | 61 63 65 0d 20 20 20 20 |hould pl|ace. |
|00003440| 20 2a 20 74 68 65 73 65 | 20 63 61 6c 6c 73 20 77 | * these| calls w|
|00003450| 69 74 68 69 6e 20 61 6e | 20 49 43 42 65 67 69 6e |ithin an| ICBegin|
|00003460| 2f 49 43 45 6e 64 20 70 | 61 69 72 2e 0d 20 20 20 |/ICEnd p|air.. |
|00003470| 20 20 2a 20 49 66 20 79 | 6f 75 20 63 61 6c 6c 20 | * If y|ou call |
|00003480| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 6f 75 74 |this rou|tine out|
|00003490| 73 69 64 65 20 6f 66 20 | 73 75 63 68 20 61 20 70 |side of |such a p|
|000034a0| 61 69 72 2c 20 69 74 20 | 69 6d 70 6c 69 63 69 74 |air, it |implicit|
|000034b0| 6c 79 0d 20 20 20 20 20 | 2a 20 63 61 6c 6c 73 20 |ly. |* calls |
|000034c0| 49 43 42 65 67 69 6e 28 | 69 6e 73 74 2c 20 69 63 |ICBegin(|inst, ic|
|000034d0| 52 65 61 64 4f 6e 6c 79 | 50 65 72 6d 29 2e 0d 20 |ReadOnly|Perm).. |
|000034e0| 20 20 20 20 2a 20 54 68 | 69 73 20 72 6f 75 74 69 | * Th|is routi|
|000034f0| 6e 65 20 69 73 20 6e 6f | 77 20 6f 62 73 6f 6c 65 |ne is no|w obsole|
|00003500| 74 65 2e 20 55 73 65 20 | 49 43 46 69 6e 64 50 72 |te. Use |ICFindPr|
|00003510| 65 66 48 61 6e 64 6c 65 | 20 69 6e 73 74 65 61 64 |efHandle| instead|
|00003520| 2e 0d 20 20 20 20 20 2a | 20 52 65 61 64 73 20 74 |.. *| Reads t|
|00003530| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 73 70 |he prefe|rence sp|
|00003540| 65 63 69 66 69 65 64 20 | 62 79 20 6b 65 79 20 66 |ecified |by key f|
|00003550| 72 6f 6d 20 74 68 65 20 | 49 43 20 64 61 74 61 62 |rom the |IC datab|
|00003560| 61 73 65 20 69 6e 74 6f | 0d 20 20 20 20 20 2a 20 |ase into|. * |
|00003570| 61 20 6e 65 77 6c 79 20 | 63 72 65 61 74 65 64 20 |a newly |created |
|00003580| 68 61 6e 64 6c 65 2c 20 | 70 72 65 66 68 2e 0d 20 |handle, |prefh.. |
|00003590| 20 20 20 20 2a 20 6b 65 | 79 20 6d 75 73 74 20 6e | * ke|y must n|
|000035a0| 6f 74 20 62 65 20 74 68 | 65 20 65 6d 70 74 79 20 |ot be th|e empty |
|000035b0| 73 74 72 69 6e 67 2e 0d | 20 20 20 20 20 2a 20 61 |string..| * a|
|000035c0| 74 74 72 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ttr is s|et to th|
|000035d0| 65 20 61 74 74 72 69 62 | 75 74 65 73 20 61 73 73 |e attrib|utes ass|
|000035e0| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |ociated |with the|
|000035f0| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00003600| 20 20 2a 20 54 68 65 20 | 69 6e 63 6f 6d 69 6e 67 | * The |incoming|
|00003610| 20 76 61 6c 75 65 20 6f | 66 20 70 72 65 66 68 20 | value o|f prefh |
|00003620| 69 73 20 69 67 6e 6f 72 | 65 64 2e 0d 20 20 20 20 |is ignor|ed.. |
|00003630| 20 2a 20 41 20 6e 65 77 | 20 68 61 6e 64 6c 65 20 | * A new| handle |
|00003640| 69 73 20 63 72 65 61 74 | 65 64 20 69 6e 20 74 68 |is creat|ed in th|
|00003650| 65 20 63 75 72 72 65 6e | 74 20 68 65 61 70 20 61 |e curren|t heap a|
|00003660| 6e 64 20 72 65 74 75 72 | 6e 65 64 20 69 6e 20 70 |nd retur|ned in p|
|00003670| 72 65 66 68 2e 0d 20 20 | 20 20 20 2a 20 49 66 20 |refh.. | * If |
|00003680| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 72 65 74 75 |the rout|ine retu|
|00003690| 72 6e 73 20 61 6e 20 65 | 72 72 6f 72 2c 20 70 72 |rns an e|rror, pr|
|000036a0| 65 66 68 20 69 73 20 73 | 65 74 20 74 6f 20 6e 69 |efh is s|et to ni|
|000036b0| 6c 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 74 68 65 |l.. |* If the|
|000036c0| 20 70 72 65 66 65 72 65 | 6e 63 65 20 64 6f 65 73 | prefere|nce does|
|000036d0| 20 6e 6f 74 20 65 78 69 | 73 74 2c 20 6e 6f 20 65 | not exi|st, no e|
|000036e0| 72 72 6f 72 20 69 73 20 | 72 65 74 75 72 6e 65 64 |rror is |returned|
|000036f0| 20 61 6e 64 20 70 72 65 | 66 68 20 69 73 20 73 65 | and pre|fh is se|
|00003700| 74 0d 20 20 20 20 20 2a | 20 74 6f 20 61 6e 20 65 |t. *| to an e|
|00003710| 6d 70 74 79 20 68 61 6e | 64 6c 65 2e 0d 20 20 20 |mpty han|dle.. |
|00003720| 20 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 | *). .| functi|
|00003730| 6f 6e 20 49 43 43 53 65 | 74 50 72 65 66 48 61 6e |on ICCSe|tPrefHan|
|00003740| 64 6c 65 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |dle(inst| : Compo|
|00003750| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 6b 65 |nentInst|ance; ke|
|00003760| 79 20 3a 20 53 74 72 32 | 35 35 3b 20 61 74 74 72 |y : Str2|55; attr|
|00003770| 20 3a 20 49 43 41 74 74 | 72 3b 20 70 72 65 66 68 | : ICAtt|r; prefh|
|00003780| 20 3a 20 48 61 6e 64 6c | 65 29 20 3a 20 49 43 45 | : Handl|e) : ICE|
|00003790| 72 72 6f 72 3b 0d 20 20 | 7b 24 69 66 63 20 6e 6f |rror;. |{$ifc no|
|000037a0| 74 20 47 65 6e 65 72 61 | 74 69 6e 67 43 46 4d 7d |t Genera|tingCFM}|
|000037b0| 0d 20 20 20 20 69 6e 6c | 69 6e 65 20 24 32 46 33 |. inl|ine $2F3|
|000037c0| 43 2c 20 31 32 2c 20 32 | 37 2c 20 24 37 30 30 30 |C, 12, 2|7, $7000|
|000037d0| 2c 20 24 41 38 32 41 3b | 0d 20 20 7b 24 65 6e 64 |, $A82A;|. {$end|
|000037e0| 63 7d 0d 20 20 20 20 28 | 2a 20 52 65 71 75 69 72 |c}. (|* Requir|
|000037f0| 65 73 20 49 43 20 31 2e | 31 2e 0d 20 20 20 20 20 |es IC 1.|1.. |
|00003800| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|00003810| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00003820| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|00003830| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|00003840| 20 20 20 20 20 2a 20 49 | 66 20 79 6f 75 20 61 72 | * I|f you ar|
|00003850| 65 20 67 65 74 74 69 6e | 67 20 6f 72 20 73 65 74 |e gettin|g or set|
|00003860| 74 69 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 70 72 |ting mul|tiple pr|
|00003870| 65 66 65 72 65 6e 63 65 | 73 2c 20 79 6f 75 20 73 |eference|s, you s|
|00003880| 68 6f 75 6c 64 20 70 6c | 61 63 65 0d 20 20 20 20 |hould pl|ace. |
|00003890| 20 2a 20 74 68 65 73 65 | 20 63 61 6c 6c 73 20 77 | * these| calls w|
|000038a0| 69 74 68 69 6e 20 61 6e | 20 49 43 42 65 67 69 6e |ithin an| ICBegin|
|000038b0| 2f 49 43 45 6e 64 20 70 | 61 69 72 2e 0d 20 20 20 |/ICEnd p|air.. |
|000038c0| 20 20 2a 20 49 66 20 79 | 6f 75 20 63 61 6c 6c 20 | * If y|ou call |
|000038d0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 6f 75 74 |this rou|tine out|
|000038e0| 73 69 64 65 20 6f 66 20 | 73 75 63 68 20 61 20 70 |side of |such a p|
|000038f0| 61 69 72 2c 20 69 74 20 | 69 6d 70 6c 69 63 69 74 |air, it |implicit|
|00003900| 6c 79 0d 20 20 20 20 20 | 2a 20 63 61 6c 6c 73 20 |ly. |* calls |
|00003910| 49 43 42 65 67 69 6e 28 | 69 6e 73 74 2c 20 69 63 |ICBegin(|inst, ic|
|00003920| 52 65 61 64 57 72 69 74 | 65 50 65 72 6d 29 2e 0d |ReadWrit|ePerm)..|
|00003930| 20 20 20 20 20 2a 20 53 | 65 74 73 20 74 68 65 20 | * S|ets the |
|00003940| 70 72 65 66 65 72 65 6e | 63 65 20 73 70 65 63 69 |preferen|ce speci|
|00003950| 66 69 65 64 20 62 79 20 | 6b 65 79 20 66 72 6f 6d |fied by |key from|
|00003960| 20 74 68 65 20 49 43 20 | 64 61 74 61 62 61 73 65 | the IC |database|
|00003970| 20 74 6f 20 74 68 65 0d | 20 20 20 20 20 2a 20 76 | to the.| * v|
|00003980| 61 6c 75 65 20 63 6f 6e | 74 61 69 6e 65 64 20 69 |alue con|tained i|
|00003990| 6e 20 70 72 65 66 68 2e | 0d 20 20 20 20 20 2a 20 |n prefh.|. * |
|000039a0| 6b 65 79 20 6d 75 73 74 | 20 6e 6f 74 20 62 65 20 |key must| not be |
|000039b0| 74 68 65 20 65 6d 70 74 | 79 20 73 74 72 69 6e 67 |the empt|y string|
|000039c0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 70 72 65 66 |.. *| If pref|
|000039d0| 68 20 69 73 20 6e 69 6c | 20 74 68 65 6e 20 74 68 |h is nil| then th|
|000039e0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 76 61 6c |e prefer|ence val|
|000039f0| 75 65 20 69 73 20 6e 6f | 74 20 73 65 74 2e 0d 20 |ue is no|t set.. |
|00003a00| 20 20 20 20 2a 20 49 66 | 20 62 75 66 20 69 73 20 | * If| buf is |
|00003a10| 6e 6f 74 20 6e 69 6c 20 | 74 68 65 6e 20 74 68 65 |not nil |then the|
|00003a20| 20 70 72 65 66 65 72 65 | 6e 63 65 20 76 61 6c 75 | prefere|nce valu|
|00003a30| 65 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |e is set| to the |
|00003a40| 64 61 74 61 0d 20 20 20 | 20 20 2a 20 63 6f 6e 74 |data. | * cont|
|00003a50| 61 69 6e 65 64 20 69 6e | 20 69 74 2e 0d 20 20 20 |ained in| it.. |
|00003a60| 20 20 2a 20 49 66 20 61 | 74 74 72 20 69 73 20 49 | * If a|ttr is I|
|00003a70| 43 61 74 74 72 5f 6e 6f | 5f 63 68 61 6e 67 65 20 |Cattr_no|_change |
|00003a80| 74 68 65 6e 20 74 68 65 | 20 70 72 65 66 65 72 65 |then the| prefere|
|00003a90| 6e 63 65 20 61 74 74 72 | 69 62 75 74 65 73 20 61 |nce attr|ibutes a|
|00003aa0| 72 65 20 6e 6f 74 20 73 | 65 74 2e 0d 20 20 20 20 |re not s|et.. |
|00003ab0| 20 2a 20 4f 74 68 65 72 | 77 69 73 65 20 74 68 65 | * Other|wise the|
|00003ac0| 20 70 72 65 66 65 72 65 | 6e 63 65 20 61 74 74 72 | prefere|nce attr|
|00003ad0| 69 62 75 74 65 73 20 61 | 72 65 20 73 65 74 20 74 |ibutes a|re set t|
|00003ae0| 6f 20 61 74 74 72 2e 0d | 20 20 20 20 20 2a 20 52 |o attr..| * R|
|00003af0| 65 74 75 72 6e 73 20 69 | 63 50 65 72 6d 45 72 72 |eturns i|cPermErr|
|00003b00| 20 69 66 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 | if the |previous|
|00003b10| 20 49 43 42 65 67 69 6e | 20 77 61 73 20 70 61 73 | ICBegin| was pas|
|00003b20| 73 65 64 20 69 63 52 65 | 61 64 4f 6e 6c 79 50 65 |sed icRe|adOnlyPe|
|00003b30| 72 6d 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |rm.. | * Retur|
|00003b40| 6e 73 20 69 63 50 65 72 | 6d 45 72 72 20 69 66 20 |ns icPer|mErr if |
|00003b50| 63 75 72 72 65 6e 74 20 | 61 74 74 72 20 69 73 20 |current |attr is |
|00003b60| 6c 6f 63 6b 65 64 2c 20 | 6e 65 77 20 61 74 74 72 |locked, |new attr|
|00003b70| 20 69 73 20 6c 6f 63 6b | 65 64 20 61 6e 64 20 70 | is lock|ed and p|
|00003b80| 72 65 66 68 20 3c 3e 20 | 6e 69 6c 2e 0d 20 20 20 |refh <> |nil.. |
|00003b90| 20 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 | *). .| functi|
|00003ba0| 6f 6e 20 49 43 43 43 6f | 75 6e 74 50 72 65 66 28 |on ICCCo|untPref(|
|00003bb0| 69 6e 73 74 20 3a 20 43 | 6f 6d 70 6f 6e 65 6e 74 |inst : C|omponent|
|00003bc0| 49 6e 73 74 61 6e 63 65 | 3b 20 76 61 72 20 63 6f |Instance|; var co|
|00003bd0| 75 6e 74 20 3a 20 6c 6f | 6e 67 69 6e 74 29 20 3a |unt : lo|ngint) :|
|00003be0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|00003bf0| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|00003c00| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|00003c10| 24 32 46 33 43 2c 20 34 | 2c 20 38 2c 20 24 37 30 |$2F3C, 4|, 8, $70|
|00003c20| 30 30 2c 20 24 41 38 32 | 41 3b 0d 20 20 7b 24 65 |00, $A82|A;. {$e|
|00003c30| 6e 64 63 7d 0d 20 20 20 | 20 28 2a 20 59 6f 75 20 |ndc}. | (* You |
|00003c40| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00003c50| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00003c60| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00003c70| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00003c80| 20 59 6f 75 20 6d 75 73 | 74 20 62 65 20 69 6e 73 | You mus|t be ins|
|00003c90| 69 64 65 20 61 6e 20 49 | 43 42 65 67 69 6e 2f 45 |ide an I|CBegin/E|
|00003ca0| 6e 64 20 70 61 69 72 20 | 74 6f 20 63 61 6c 6c 20 |nd pair |to call |
|00003cb0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00003cc0| 20 20 20 2a 20 43 6f 75 | 6e 74 73 20 74 68 65 20 | * Cou|nts the |
|00003cd0| 74 6f 74 61 6c 20 6e 75 | 6d 62 65 72 20 6f 66 20 |total nu|mber of |
|00003ce0| 70 72 65 66 65 72 65 6e | 63 65 73 2e 0d 20 20 20 |preferen|ces.. |
|00003cf0| 20 20 2a 20 49 66 20 74 | 68 65 20 72 6f 75 74 69 | * If t|he routi|
|00003d00| 6e 65 20 72 65 74 75 72 | 6e 73 20 61 6e 20 65 72 |ne retur|ns an er|
|00003d10| 72 6f 72 2c 20 63 6f 75 | 6e 74 20 69 73 20 73 65 |ror, cou|nt is se|
|00003d20| 74 20 74 6f 20 30 2e 0d | 20 20 20 20 20 2a 29 0d |t to 0..| *).|
|00003d30| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00003d40| 43 47 65 74 49 6e 64 50 | 72 65 66 28 69 6e 73 74 |CGetIndP|ref(inst|
|00003d50| 20 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 | : Compo|nentInst|
|00003d60| 61 6e 63 65 3b 20 6e 20 | 3a 20 6c 6f 6e 67 69 6e |ance; n |: longin|
|00003d70| 74 3b 20 76 61 72 20 6b | 65 79 20 3a 20 53 74 72 |t; var k|ey : Str|
|00003d80| 32 35 35 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |255) : I|CError;.|
|00003d90| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|00003da0| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|00003db0| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 38 2c 20 |nline $2|F3C, 8, |
|00003dc0| 39 2c 20 24 37 30 30 30 | 2c 20 24 41 38 32 41 3b |9, $7000|, $A82A;|
|00003dd0| 0d 20 20 7b 24 65 6e 64 | 63 7d 0d 20 20 20 20 28 |. {$end|c}. (|
|00003de0| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|00003df0| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00003e00| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|00003e10| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|00003e20| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00003e30| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|00003e40| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|00003e50| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00003e60| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ne.. | * Retur|
|00003e70| 6e 73 20 74 68 65 20 6b | 65 79 20 6f 66 20 74 68 |ns the k|ey of th|
|00003e80| 65 20 4e 74 68 20 70 72 | 65 66 65 72 65 6e 63 65 |e Nth pr|eference|
|00003e90| 2e 0d 20 20 20 20 20 2a | 20 6e 20 6d 75 73 74 20 |.. *| n must |
|00003ea0| 62 65 20 70 6f 73 69 74 | 69 76 65 2e 0d 20 20 20 |be posit|ive.. |
|00003eb0| 20 20 2a 20 52 65 74 75 | 72 6e 73 20 69 63 50 72 | * Retu|rns icPr|
|00003ec0| 65 66 4e 6f 74 46 6f 75 | 6e 64 45 72 72 20 69 66 |efNotFou|ndErr if|
|00003ed0| 20 6e 20 69 73 20 67 72 | 65 61 74 65 72 20 74 68 | n is gr|eater th|
|00003ee0| 61 6e 20 74 68 65 20 74 | 6f 74 61 6c 20 6e 75 6d |an the t|otal num|
|00003ef0| 62 65 72 20 6f 66 20 70 | 72 65 66 65 72 65 6e 63 |ber of p|referenc|
|00003f00| 65 73 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 74 68 |es.. | * If th|
|00003f10| 65 20 72 6f 75 74 69 6e | 65 20 72 65 74 75 72 6e |e routin|e return|
|00003f20| 73 20 61 6e 20 65 72 72 | 6f 72 2c 20 6b 65 79 20 |s an err|or, key |
|00003f30| 69 73 20 75 6e 64 65 66 | 69 6e 65 64 2e 0d 20 20 |is undef|ined.. |
|00003f40| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00003f50| 69 6f 6e 20 49 43 43 44 | 65 6c 65 74 65 50 72 65 |ion ICCD|eletePre|
|00003f60| 66 28 69 6e 73 74 20 3a | 20 43 6f 6d 70 6f 6e 65 |f(inst :| Compone|
|00003f70| 6e 74 49 6e 73 74 61 6e | 63 65 3b 20 6b 65 79 20 |ntInstan|ce; key |
|00003f80| 3a 20 53 74 72 32 35 35 | 29 20 3a 20 49 43 45 72 |: Str255|) : ICEr|
|00003f90| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|00003fa0| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|00003fb0| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00003fc0| 2c 20 34 2c 20 31 32 2c | 20 24 37 30 30 30 2c 20 |, 4, 12,| $7000, |
|00003fd0| 24 41 38 32 41 3b 0d 20 | 20 7b 24 65 6e 64 63 7d |$A82A;. | {$endc}|
|00003fe0| 0d 20 20 20 20 28 2a 20 | 59 6f 75 20 6d 75 73 74 |. (* |You must|
|00003ff0| 20 73 70 65 63 69 66 79 | 20 61 20 63 6f 6e 66 69 | specify| a confi|
|00004000| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|00004010| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00004020| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |tine.. | * You|
|00004030| 20 6d 75 73 74 20 62 65 | 20 69 6e 73 69 64 65 20 | must be| inside |
|00004040| 61 6e 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 |an ICBeg|in/End p|
|00004050| 61 69 72 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |air to c|all this|
|00004060| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00004070| 20 44 65 6c 65 74 65 73 | 20 74 68 65 20 70 72 65 | Deletes| the pre|
|00004080| 66 65 72 65 6e 63 65 20 | 73 70 65 63 69 66 69 65 |ference |specifie|
|00004090| 64 20 62 79 20 6b 65 79 | 2e 0d 20 20 20 20 20 2a |d by key|.. *|
|000040a0| 20 6b 65 79 20 6d 75 73 | 74 20 6e 6f 74 20 62 65 | key mus|t not be|
|000040b0| 20 74 68 65 20 65 6d 70 | 74 79 20 73 74 72 69 6e | the emp|ty strin|
|000040c0| 67 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |g.. |* Return|
|000040d0| 73 20 69 63 50 72 65 66 | 4e 6f 74 46 6f 75 6e 64 |s icPref|NotFound|
|000040e0| 20 69 66 20 74 68 65 20 | 70 72 65 66 65 72 65 6e | if the |preferen|
|000040f0| 63 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |ce speci|fied by |
|00004100| 6b 65 79 20 69 73 20 6e | 6f 74 20 70 72 65 73 65 |key is n|ot prese|
|00004110| 6e 74 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |nt.. | *). . |
|00004120| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 43 45 6e 64 | functio|n ICCEnd|
|00004130| 28 69 6e 73 74 20 3a 20 | 43 6f 6d 70 6f 6e 65 6e |(inst : |Componen|
|00004140| 74 49 6e 73 74 61 6e 63 | 65 29 20 3a 20 49 43 45 |tInstanc|e) : ICE|
|00004150| 72 72 6f 72 3b 0d 20 20 | 7b 24 69 66 63 20 6e 6f |rror;. |{$ifc no|
|00004160| 74 20 47 65 6e 65 72 61 | 74 69 6e 67 43 46 4d 7d |t Genera|tingCFM}|
|00004170| 0d 20 20 20 20 69 6e 6c | 69 6e 65 20 24 32 46 33 |. inl|ine $2F3|
|00004180| 43 2c 20 30 2c 20 31 30 | 2c 20 24 37 30 30 30 2c |C, 0, 10|, $7000,|
|00004190| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|000041a0| 7d 0d 20 20 20 20 28 2a | 20 59 6f 75 20 6d 75 73 |}. (*| You mus|
|000041b0| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|000041c0| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|000041d0| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|000041e0| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 59 6f |utine.. | * Yo|
|000041f0| 75 20 6d 75 73 74 20 62 | 65 20 69 6e 73 69 64 65 |u must b|e inside|
|00004200| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|00004210| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|00004220| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00004230| 2a 20 54 65 72 6d 69 6e | 61 74 65 73 20 61 20 70 |* Termin|ates a p|
|00004240| 72 65 66 65 72 65 6e 63 | 65 20 73 65 73 73 69 6f |referenc|e sessio|
|00004250| 6e 2c 20 61 73 20 73 74 | 61 72 74 65 64 20 62 79 |n, as st|arted by|
|00004260| 20 49 43 42 65 67 69 6e | 2e 0d 20 20 20 20 20 2a | ICBegin|.. *|
|00004270| 20 59 6f 75 20 6d 75 73 | 74 20 68 61 76 65 20 63 | You mus|t have c|
|00004280| 61 6c 6c 65 64 20 49 43 | 42 65 67 69 6e 20 62 65 |alled IC|Begin be|
|00004290| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|000042a0| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|000042b0| 2a 29 0d 20 20 0d 20 20 | 28 2a 20 2a 2a 2a 2a 2a |*). . |(* *****|
|000042c0| 20 55 73 65 72 20 49 6e | 74 65 72 66 61 63 65 20 | User In|terface |
|000042d0| 53 74 75 66 66 20 2a 2a | 2a 2a 2a 20 2a 29 0d 20 |Stuff **|*** *). |
|000042e0| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 43 | . func|tion ICC|
|000042f0| 45 64 69 74 50 72 65 66 | 65 72 65 6e 63 65 73 28 |EditPref|erences(|
|00004300| 69 6e 73 74 20 3a 20 43 | 6f 6d 70 6f 6e 65 6e 74 |inst : C|omponent|
|00004310| 49 6e 73 74 61 6e 63 65 | 3b 20 6b 65 79 20 3a 20 |Instance|; key : |
|00004320| 53 74 72 32 35 35 29 20 | 3a 20 49 43 45 72 72 6f |Str255) |: ICErro|
|00004330| 72 3b 0d 20 20 7b 24 69 | 66 63 20 6e 6f 74 20 47 |r;. {$i|fc not G|
|00004340| 65 6e 65 72 61 74 69 6e | 67 43 46 4d 7d 0d 20 20 |eneratin|gCFM}. |
|00004350| 20 20 69 6e 6c 69 6e 65 | 20 24 32 46 33 43 2c 20 | inline| $2F3C, |
|00004360| 34 2c 20 31 35 2c 20 24 | 37 30 30 30 2c 20 24 41 |4, 15, $|7000, $A|
|00004370| 38 32 41 3b 0d 20 20 7b | 24 65 6e 64 63 7d 0d 20 |82A;. {|$endc}. |
|00004380| 20 20 20 28 2a 20 52 65 | 71 75 69 72 65 73 20 49 | (* Re|quires I|
|00004390| 43 20 31 2e 31 2e 0d 20 | 20 20 20 20 2a 20 59 6f |C 1.1.. | * Yo|
|000043a0| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|000043b0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|000043c0| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|000043d0| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|000043e0| 20 2a 20 59 6f 75 20 64 | 6f 20 6e 6f 74 20 68 61 | * You d|o not ha|
|000043f0| 76 65 20 74 6f 20 62 65 | 20 69 6e 73 69 64 65 20 |ve to be| inside |
|00004400| 61 6e 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 |an ICBeg|in/End p|
|00004410| 61 69 72 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |air to c|all this|
|00004420| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00004430| 20 49 6e 73 74 72 75 63 | 74 73 20 49 43 20 74 6f | Instruc|ts IC to|
|00004440| 20 64 69 73 70 6c 61 79 | 20 74 68 65 20 75 73 65 | display| the use|
|00004450| 72 20 69 6e 74 65 72 66 | 61 63 65 20 61 73 73 6f |r interf|ace asso|
|00004460| 63 69 61 74 65 64 20 77 | 69 74 68 20 65 64 69 74 |ciated w|ith edit|
|00004470| 69 6e 67 0d 20 20 20 20 | 20 2a 20 70 72 65 66 65 |ing. | * prefe|
|00004480| 72 65 6e 63 65 73 20 61 | 6e 64 20 66 6f 63 75 73 |rences a|nd focus|
|00004490| 69 6e 67 20 6f 6e 20 74 | 68 65 20 70 72 65 66 65 |ing on t|he prefe|
|000044a0| 72 65 6e 63 65 20 73 70 | 65 63 69 66 69 65 64 20 |rence sp|ecified |
|000044b0| 62 79 20 6b 65 79 2e 0d | 20 20 20 20 20 2a 20 49 |by key..| * I|
|000044c0| 66 20 6b 65 79 20 69 73 | 20 74 68 65 20 65 6d 70 |f key is| the emp|
|000044d0| 74 79 20 73 74 72 69 6e | 67 20 74 68 65 6e 20 6e |ty strin|g then n|
|000044e0| 6f 20 70 72 65 66 65 72 | 65 6e 63 65 20 73 68 6f |o prefer|ence sho|
|000044f0| 75 6c 64 20 62 65 20 66 | 6f 63 75 73 65 64 20 75 |uld be f|ocused u|
|00004500| 70 6f 6e 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |pon.. | * You |
|00004510| 6d 75 73 74 20 68 61 76 | 65 20 73 70 65 63 69 66 |must hav|e specif|
|00004520| 69 65 64 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ied a co|nfigurat|
|00004530| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00004540| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00004550| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 64 6f 20 6e |. * |You do n|
|00004560| 6f 74 20 6e 65 65 64 20 | 74 6f 20 63 61 6c 6c 20 |ot need |to call |
|00004570| 49 43 42 65 67 69 6e 20 | 62 65 66 6f 72 65 20 63 |ICBegin |before c|
|00004580| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00004590| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 49 6e 20 74 |ine.. | * In t|
|000045a0| 68 65 20 63 75 72 72 65 | 6e 74 20 69 6d 70 6c 65 |he curre|nt imple|
|000045b0| 6d 65 6e 74 61 74 69 6f | 6e 20 74 68 69 73 20 6c |mentatio|n this l|
|000045c0| 61 75 6e 63 68 65 73 20 | 74 68 65 20 49 43 20 61 |aunches |the IC a|
|000045d0| 70 70 6c 69 63 61 74 69 | 6f 6e 0d 20 20 20 20 20 |pplicati|on. |
|000045e0| 2a 20 28 6f 72 20 62 72 | 69 6e 67 73 20 69 74 20 |* (or br|ings it |
|000045f0| 74 6f 20 74 68 65 20 66 | 72 6f 6e 74 29 20 61 6e |to the f|ront) an|
|00004600| 64 20 64 69 73 70 6c 61 | 79 73 20 74 68 65 20 77 |d displa|ys the w|
|00004610| 69 6e 64 6f 77 20 63 6f | 6e 74 61 69 6e 69 6e 67 |indow co|ntaining|
|00004620| 0d 20 20 20 20 20 2a 20 | 74 68 65 20 70 72 65 66 |. * |the pref|
|00004630| 65 72 65 6e 63 65 20 73 | 70 65 63 69 66 69 65 64 |erence s|pecified|
|00004640| 20 62 79 20 6b 65 79 2e | 0d 20 20 20 20 20 2a 20 | by key.|. * |
|00004650| 49 74 20 6d 61 79 20 68 | 61 76 65 20 61 20 72 61 |It may h|ave a ra|
|00004660| 64 69 63 61 6c 6c 79 20 | 64 69 66 66 65 72 65 6e |dically |differen|
|00004670| 74 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |t implem|entation|
|00004680| 20 69 6e 20 66 75 74 75 | 72 65 0d 20 20 20 20 20 | in futu|re. |
|00004690| 2a 20 49 43 20 73 79 73 | 74 65 6d 73 2e 0d 20 20 |* IC sys|tems.. |
|000046a0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 28 2a 20 2a 2a | *). |. (* **|
|000046b0| 2a 2a 2a 20 55 52 4c 20 | 48 61 6e 64 6c 69 6e 67 |*** URL |Handling|
|000046c0| 20 2a 2a 2a 2a 2a 20 2a | 29 0d 20 20 0d 20 20 66 | ***** *|). . f|
|000046d0| 75 6e 63 74 69 6f 6e 20 | 49 43 43 50 61 72 73 65 |unction |ICCParse|
|000046e0| 55 52 4c 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |URL(inst| : Compo|
|000046f0| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 68 69 |nentInst|ance; hi|
|00004700| 6e 74 20 3a 20 53 74 72 | 32 35 35 3b 20 64 61 74 |nt : Str|255; dat|
|00004710| 61 20 3a 20 50 74 72 3b | 20 6c 65 6e 20 3a 20 6c |a : Ptr;| len : l|
|00004720| 6f 6e 67 69 6e 74 3b 20 | 76 61 72 20 73 65 6c 53 |ongint; |var selS|
|00004730| 74 61 72 74 20 3a 20 6c | 6f 6e 67 69 6e 74 3b 20 |tart : l|ongint; |
|00004740| 76 61 72 20 73 65 6c 45 | 6e 64 20 3a 20 6c 6f 6e |var selE|nd : lon|
|00004750| 67 69 6e 74 3b 20 75 72 | 6c 20 3a 20 48 61 6e 64 |gint; ur|l : Hand|
|00004760| 6c 65 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |le) : IC|Error;. |
|00004770| 20 7b 24 69 66 63 20 6e | 6f 74 20 47 65 6e 65 72 | {$ifc n|ot Gener|
|00004780| 61 74 69 6e 67 43 46 4d | 7d 0d 20 20 20 20 69 6e |atingCFM|}. in|
|00004790| 6c 69 6e 65 20 24 32 46 | 33 43 2c 20 32 34 2c 20 |line $2F|3C, 24, |
|000047a0| 31 36 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 |16, $700|0, $A82A|
|000047b0| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|000047c0| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|000047d0| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.1.. | * You m|
|000047e0| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|000047f0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00004800| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00004810| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00004820| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00004830| 74 6f 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |to be in|side an |
|00004840| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00004850| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00004860| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 50 61 |utine.. | * Pa|
|00004870| 72 73 65 73 20 61 20 55 | 52 4c 20 6f 75 74 20 6f |rses a U|RL out o|
|00004880| 66 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |f the sp|ecified |
|00004890| 74 65 78 74 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |text and| returns|
|000048a0| 20 69 74 20 69 6e 20 61 | 20 63 61 6e 6f 6e 69 63 | it in a| canonic|
|000048b0| 61 6c 20 66 6f 72 6d 0d | 20 20 20 20 20 2a 20 69 |al form.| * i|
|000048c0| 6e 20 61 20 68 61 6e 64 | 6c 65 2e 0d 20 20 20 20 |n a hand|le.. |
|000048d0| 20 2a 20 68 69 6e 74 20 | 69 6e 64 69 63 61 74 65 | * hint |indicate|
|000048e0| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 73 63 |s the de|fault sc|
|000048f0| 68 65 6d 65 20 66 6f 72 | 20 55 52 4c 73 20 6f 66 |heme for| URLs of|
|00004900| 20 74 68 65 20 66 6f 72 | 6d 20 22 6e 61 6d 65 40 | the for|m "name@|
|00004910| 61 64 64 72 65 73 73 22 | 2e 0d 20 20 20 20 20 2a |address"|.. *|
|00004920| 20 49 66 20 68 69 6e 74 | 20 69 73 20 74 68 65 20 | If hint| is the |
|00004930| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 20 74 68 65 |empty st|ring the|
|00004940| 6e 20 55 52 4c 73 20 6f | 66 20 74 68 61 74 20 66 |n URLs o|f that f|
|00004950| 6f 72 6d 20 61 72 65 20 | 6e 6f 74 20 61 6c 6c 6f |orm are |not allo|
|00004960| 77 65 64 2e 0d 20 20 20 | 20 20 2a 20 64 61 74 61 |wed.. | * data|
|00004970| 20 70 6f 69 6e 74 73 20 | 74 6f 20 74 68 65 20 73 | points |to the s|
|00004980| 74 61 72 74 20 6f 66 20 | 74 68 65 20 74 65 78 74 |tart of |the text|
|00004990| 2e 20 49 74 20 6d 75 73 | 74 20 6e 6f 74 20 62 65 |. It mus|t not be|
|000049a0| 20 6e 69 6c 2e 0d 20 20 | 20 20 20 2a 20 6c 65 6e | nil.. | * len|
|000049b0| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 65 20 6c | indicat|es the l|
|000049c0| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 74 65 78 |ength of| the tex|
|000049d0| 74 2e 20 49 74 20 6d 75 | 73 74 20 62 65 20 6e 6f |t. It mu|st be no|
|000049e0| 6e 2d 6e 65 67 61 74 69 | 76 65 2e 0d 20 20 20 20 |n-negati|ve.. |
|000049f0| 20 2a 20 73 65 6c 53 74 | 61 72 74 20 61 6e 64 20 | * selSt|art and |
|00004a00| 73 65 6c 45 6e 64 20 73 | 68 6f 75 6c 64 20 62 65 |selEnd s|hould be|
|00004a10| 20 70 61 73 73 65 64 20 | 69 6e 20 61 73 20 74 68 | passed |in as th|
|00004a20| 65 20 63 75 72 72 65 6e | 74 20 73 65 6c 65 63 74 |e curren|t select|
|00004a30| 69 6f 6e 20 6f 66 0d 20 | 20 20 20 20 2a 20 74 68 |ion of. | * th|
|00004a40| 65 20 74 65 78 74 2e 20 | 54 68 69 73 20 73 65 6c |e text. |This sel|
|00004a50| 65 63 74 69 6f 6e 20 69 | 73 20 67 69 76 65 6e 20 |ection i|s given |
|00004a60| 69 6e 20 74 68 65 20 73 | 61 6d 65 20 6d 61 6e 6e |in the s|ame mann|
|00004a70| 65 72 20 61 73 20 54 65 | 78 74 45 64 69 74 2c 0d |er as Te|xtEdit,.|
|00004a80| 20 20 20 20 20 2a 20 69 | 65 20 69 66 20 73 65 6c | * i|e if sel|
|00004a90| 53 74 61 72 74 20 3d 20 | 73 65 6c 45 6e 64 20 74 |Start = |selEnd t|
|00004aa0| 68 65 6e 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |hen ther|e is no |
|00004ab0| 73 65 6c 65 63 74 69 6f | 6e 20 6f 6e 6c 79 20 61 |selectio|n only a|
|00004ac0| 6e 20 69 6e 73 65 72 74 | 69 6f 6e 0d 20 20 20 20 |n insert|ion. |
|00004ad0| 20 2a 20 70 6f 69 6e 74 | 2e 20 41 6c 73 6f 20 73 | * point|. Also s|
|00004ae0| 65 6c 53 74 61 72 74 20 | b2 20 73 65 6c 45 6e 64 |elStart |. selEnd|
|00004af0| 20 61 6e 64 20 30 20 b2 | 20 73 65 6c 53 74 61 72 | and 0 .| selStar|
|00004b00| 74 20 b2 20 6c 65 6e 20 | 61 6e 64 20 30 20 b2 20 |t . len |and 0 . |
|00004b10| 73 65 6c 45 6e 64 20 b2 | 20 6c 65 6e 2e 0d 20 20 |selEnd .| len.. |
|00004b20| 20 20 20 2a 20 73 65 6c | 53 74 61 72 74 20 61 6e | * sel|Start an|
|00004b30| 64 20 73 65 6c 45 6e 64 | 20 61 72 65 20 72 65 74 |d selEnd| are ret|
|00004b40| 75 72 6e 65 64 20 61 73 | 20 74 68 65 20 62 6f 75 |urned as| the bou|
|00004b50| 6e 64 73 20 6f 66 20 74 | 68 65 20 55 52 4c 2e 20 |nds of t|he URL. |
|00004b60| 49 66 20 74 68 65 0d 20 | 20 20 20 20 2a 20 72 6f |If the. | * ro|
|00004b70| 75 74 69 6e 65 20 72 65 | 74 75 72 6e 73 20 61 6e |utine re|turns an|
|00004b80| 20 65 72 72 6f 72 20 74 | 68 65 6e 20 74 68 65 73 | error t|hen thes|
|00004b90| 65 20 6e 65 77 20 62 6f | 75 6e 64 61 72 69 65 73 |e new bo|undaries|
|00004ba0| 20 6d 61 79 20 62 65 0d | 20 20 20 20 20 2a 20 69 | may be.| * i|
|00004bb0| 6e 76 61 6c 69 64 20 62 | 75 74 20 74 68 65 79 20 |nvalid b|ut they |
|00004bc0| 77 69 6c 6c 20 62 65 20 | 63 6c 6f 73 65 2e 0d 20 |will be |close.. |
|00004bd0| 20 20 20 20 2a 20 54 68 | 65 20 69 6e 63 6f 6d 69 | * Th|e incomi|
|00004be0| 6e 67 20 75 72 6c 20 68 | 61 6e 64 6c 65 20 6d 75 |ng url h|andle mu|
|00004bf0| 73 74 20 6e 6f 74 20 62 | 65 20 6e 69 6c 2e 20 20 |st not b|e nil. |
|00004c00| 54 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 55 52 |The resu|lting UR|
|00004c10| 4c 20 69 73 20 6e 6f 72 | 6d 61 6c 69 73 65 64 0d |L is nor|malised.|
|00004c20| 20 20 20 20 20 2a 20 61 | 6e 64 20 63 6f 70 69 65 | * a|nd copie|
|00004c30| 64 20 69 6e 74 6f 20 74 | 68 65 20 75 72 6c 20 68 |d into t|he url h|
|00004c40| 61 6e 64 6c 65 2c 20 77 | 68 69 63 68 20 69 73 20 |andle, w|hich is |
|00004c50| 72 65 73 69 7a 65 64 20 | 74 6f 20 66 69 74 2e 0d |resized |to fit..|
|00004c60| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00004c70| 63 74 69 6f 6e 20 49 43 | 43 4c 61 75 6e 63 68 55 |ction IC|CLaunchU|
|00004c80| 52 4c 28 69 6e 73 74 20 | 3a 20 43 6f 6d 70 6f 6e |RL(inst |: Compon|
|00004c90| 65 6e 74 49 6e 73 74 61 | 6e 63 65 3b 20 68 69 6e |entInsta|nce; hin|
|00004ca0| 74 20 3a 20 53 74 72 32 | 35 35 3b 20 64 61 74 61 |t : Str2|55; data|
|00004cb0| 20 3a 20 50 74 72 3b 20 | 6c 65 6e 20 3a 20 6c 6f | : Ptr; |len : lo|
|00004cc0| 6e 67 69 6e 74 3b 20 76 | 61 72 20 73 65 6c 53 74 |ngint; v|ar selSt|
|00004cd0| 61 72 74 20 3a 20 6c 6f | 6e 67 69 6e 74 3b 20 76 |art : lo|ngint; v|
|00004ce0| 61 72 20 73 65 6c 45 6e | 64 20 3a 20 6c 6f 6e 67 |ar selEn|d : long|
|00004cf0| 69 6e 74 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |int) : I|CError;.|
|00004d00| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|00004d10| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|00004d20| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 32 30 2c |nline $2|F3C, 20,|
|00004d30| 20 31 37 2c 20 24 37 30 | 30 30 2c 20 24 41 38 32 | 17, $70|00, $A82|
|00004d40| 41 3b 0d 20 20 7b 24 65 | 6e 64 63 7d 0d 20 20 20 |A;. {$e|ndc}. |
|00004d50| 20 28 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | (* Requ|ires IC |
|00004d60| 31 2e 31 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |1.1.. | * You |
|00004d70| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00004d80| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00004d90| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00004da0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00004db0| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00004dc0| 20 74 6f 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e | to be i|nside an|
|00004dd0| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00004de0| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|00004df0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 50 |outine..| * P|
|00004e00| 61 72 73 65 73 20 61 20 | 55 52 4c 20 6f 75 74 20 |arses a |URL out |
|00004e10| 6f 66 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |of the s|pecified|
|00004e20| 20 74 65 78 74 20 61 6e | 64 20 66 65 65 64 73 20 | text an|d feeds |
|00004e30| 69 74 20 6f 66 66 20 74 | 6f 20 74 68 65 0d 20 20 |it off t|o the. |
|00004e40| 20 20 20 2a 20 61 70 70 | 72 6f 70 72 69 61 74 65 | * app|ropriate|
|00004e50| 20 68 65 6c 70 65 72 2e | 0d 20 20 20 20 20 2a 20 | helper.|. * |
|00004e60| 68 69 6e 74 20 69 6e 64 | 69 63 61 74 65 73 20 74 |hint ind|icates t|
|00004e70| 68 65 20 64 65 66 61 75 | 6c 74 20 73 63 68 65 6d |he defau|lt schem|
|00004e80| 65 20 66 6f 72 20 55 52 | 4c 73 20 6f 66 20 74 68 |e for UR|Ls of th|
|00004e90| 65 20 66 6f 72 6d 20 22 | 6e 61 6d 65 40 61 64 64 |e form "|name@add|
|00004ea0| 72 65 73 73 22 2e 0d 20 | 20 20 20 20 2a 20 49 66 |ress".. | * If|
|00004eb0| 20 68 69 6e 74 20 69 73 | 20 74 68 65 20 65 6d 70 | hint is| the emp|
|00004ec0| 74 79 20 73 74 72 69 6e | 67 20 74 68 65 6e 20 55 |ty strin|g then U|
|00004ed0| 52 4c 73 20 6f 66 20 74 | 68 61 74 20 66 6f 72 6d |RLs of t|hat form|
|00004ee0| 20 61 72 65 20 6e 6f 74 | 20 61 6c 6c 6f 77 65 64 | are not| allowed|
|00004ef0| 2e 0d 20 20 20 20 20 2a | 20 64 61 74 61 20 70 6f |.. *| data po|
|00004f00| 69 6e 74 73 20 74 6f 20 | 74 68 65 20 73 74 61 72 |ints to |the star|
|00004f10| 74 20 6f 66 20 74 68 65 | 20 74 65 78 74 2e 20 49 |t of the| text. I|
|00004f20| 74 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 6e 69 |t must n|ot be ni|
|00004f30| 6c 2e 0d 20 20 20 20 20 | 2a 20 6c 65 6e 20 69 6e |l.. |* len in|
|00004f40| 64 69 63 61 74 65 73 20 | 74 68 65 20 6c 65 6e 67 |dicates |the leng|
|00004f50| 74 68 20 6f 66 20 74 68 | 65 20 74 65 78 74 2e 20 |th of th|e text. |
|00004f60| 49 74 20 6d 75 73 74 20 | 62 65 20 6e 6f 6e 2d 6e |It must |be non-n|
|00004f70| 65 67 61 74 69 76 65 2e | 0d 20 20 20 20 20 2a 20 |egative.|. * |
|00004f80| 73 65 6c 53 74 61 72 74 | 20 61 6e 64 20 73 65 6c |selStart| and sel|
|00004f90| 45 6e 64 20 73 68 6f 75 | 6c 64 20 62 65 20 70 61 |End shou|ld be pa|
|00004fa0| 73 73 65 64 20 69 6e 20 | 61 73 20 74 68 65 20 63 |ssed in |as the c|
|00004fb0| 75 72 72 65 6e 74 20 73 | 65 6c 65 63 74 69 6f 6e |urrent s|election|
|00004fc0| 20 6f 66 0d 20 20 20 20 | 20 2a 20 74 68 65 20 74 | of. | * the t|
|00004fd0| 65 78 74 2e 20 54 68 69 | 73 20 73 65 6c 65 63 74 |ext. Thi|s select|
|00004fe0| 69 6f 6e 20 69 73 20 67 | 69 76 65 6e 20 69 6e 20 |ion is g|iven in |
|00004ff0| 74 68 65 20 73 61 6d 65 | 20 6d 61 6e 6e 65 72 20 |the same| manner |
|00005000| 61 73 20 54 65 78 74 45 | 64 69 74 2c 0d 20 20 20 |as TextE|dit,. |
|00005010| 20 20 2a 20 69 65 20 69 | 66 20 73 65 6c 53 74 61 | * ie i|f selSta|
|00005020| 72 74 20 3d 20 73 65 6c | 45 6e 64 20 74 68 65 6e |rt = sel|End then|
|00005030| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 73 65 6c | there i|s no sel|
|00005040| 65 63 74 69 6f 6e 20 6f | 6e 6c 79 20 61 6e 20 69 |ection o|nly an i|
|00005050| 6e 73 65 72 74 69 6f 6e | 0d 20 20 20 20 20 2a 20 |nsertion|. * |
|00005060| 70 6f 69 6e 74 2e 20 41 | 6c 73 6f 20 73 65 6c 53 |point. A|lso selS|
|00005070| 74 61 72 74 20 b2 20 73 | 65 6c 45 6e 64 20 61 6e |tart . s|elEnd an|
|00005080| 64 20 30 20 b2 20 73 65 | 6c 53 74 61 72 74 20 b2 |d 0 . se|lStart .|
|00005090| 20 6c 65 6e 20 61 6e 64 | 20 30 20 b2 20 73 65 6c | len and| 0 . sel|
|000050a0| 45 6e 64 20 b2 20 6c 65 | 6e 2e 0d 20 20 20 20 20 |End . le|n.. |
|000050b0| 2a 20 73 65 6c 53 74 61 | 72 74 20 61 6e 64 20 73 |* selSta|rt and s|
|000050c0| 65 6c 45 6e 64 20 61 72 | 65 20 72 65 74 75 72 6e |elEnd ar|e return|
|000050d0| 65 64 20 61 73 20 74 68 | 65 20 62 6f 75 6e 64 73 |ed as th|e bounds|
|000050e0| 20 6f 66 20 74 68 65 20 | 55 52 4c 2e 20 49 66 20 | of the |URL. If |
|000050f0| 74 68 65 0d 20 20 20 20 | 20 2a 20 72 6f 75 74 69 |the. | * routi|
|00005100| 6e 65 20 72 65 74 75 72 | 6e 73 20 61 6e 20 65 72 |ne retur|ns an er|
|00005110| 72 6f 72 20 74 68 65 6e | 20 74 68 65 73 65 20 6e |ror then| these n|
|00005120| 65 77 20 62 6f 75 6e 64 | 61 72 69 65 73 20 6d 61 |ew bound|aries ma|
|00005130| 79 20 62 65 0d 20 20 20 | 20 20 2a 20 69 6e 76 61 |y be. | * inva|
|00005140| 6c 69 64 20 62 75 74 20 | 74 68 65 79 20 77 69 6c |lid but |they wil|
|00005150| 6c 20 62 65 20 63 6c 6f | 73 65 2e 0d 20 20 20 20 |l be clo|se.. |
|00005160| 20 2a 20 54 68 65 20 55 | 52 4c 20 69 73 20 70 61 | * The U|RL is pa|
|00005170| 72 73 65 64 20 6f 75 74 | 20 6f 66 20 74 68 65 20 |rsed out| of the |
|00005180| 74 65 78 74 20 61 6e 64 | 20 70 61 73 73 65 64 20 |text and| passed |
|00005190| 6f 66 66 20 74 6f 20 74 | 68 65 20 61 70 70 72 6f |off to t|he appro|
|000051a0| 70 72 69 61 74 65 0d 20 | 20 20 20 20 2a 20 68 65 |priate. | * he|
|000051b0| 6c 70 65 72 20 75 73 69 | 6e 67 20 74 68 65 20 47 |lper usi|ng the G|
|000051c0| 55 52 4c 20 41 70 70 6c | 65 45 76 65 6e 74 2e 0d |URL Appl|eEvent..|
|000051d0| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 28 2a 20 | *).| . (* |
|000051e0| 2a 2a 2a 2a 2a 20 4d 61 | 70 70 69 6e 67 73 20 52 |***** Ma|ppings R|
|000051f0| 6f 75 74 69 6e 65 73 20 | 2a 2a 2a 2a 2a 0d 20 20 |outines |*****. |
|00005200| 20 2a 20 0d 20 20 20 2a | 20 52 6f 75 74 69 6e 65 | * . *| Routine|
|00005210| 73 20 66 6f 72 20 69 6e | 74 65 72 72 6f 67 61 74 |s for in|terrogat|
|00005220| 69 6e 67 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 |ing mapp|ings dat|
|00005230| 61 62 61 73 65 2e 0d 20 | 20 20 2a 20 0d 20 20 20 |abase.. | * . |
|00005240| 2a 20 2d 2d 2d 2d 2d 20 | 48 69 67 68 20 4c 65 76 |* ----- |High Lev|
|00005250| 65 6c 20 52 6f 75 74 69 | 6e 65 73 20 2d 2d 2d 2d |el Routi|nes ----|
|00005260| 2d 0d 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e |-. *).| . fun|
|00005270| 63 74 69 6f 6e 20 49 43 | 43 4d 61 70 46 69 6c 65 |ction IC|CMapFile|
|00005280| 6e 61 6d 65 28 69 6e 73 | 74 20 3a 20 43 6f 6d 70 |name(ins|t : Comp|
|00005290| 6f 6e 65 6e 74 49 6e 73 | 74 61 6e 63 65 3b 20 66 |onentIns|tance; f|
|000052a0| 69 6c 65 6e 61 6d 65 20 | 3a 20 53 74 72 32 35 35 |ilename |: Str255|
|000052b0| 3b 20 76 61 72 20 65 6e | 74 72 79 20 3a 20 49 43 |; var en|try : IC|
|000052c0| 4d 61 70 45 6e 74 72 79 | 29 20 3a 20 49 43 45 72 |MapEntry|) : ICEr|
|000052d0| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|000052e0| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|000052f0| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00005300| 2c 20 38 2c 20 32 34 2c | 20 24 37 30 30 30 2c 20 |, 8, 24,| $7000, |
|00005310| 24 41 38 32 41 3b 0d 20 | 20 7b 24 65 6e 64 63 7d |$A82A;. | {$endc}|
|00005320| 0d 20 20 20 20 28 2a 20 | 52 65 71 75 69 72 65 73 |. (* |Requires|
|00005330| 20 49 43 20 31 2e 31 2e | 0d 20 20 20 20 20 2a 20 | IC 1.1.|. * |
|00005340| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00005350| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00005360| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00005370| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00005380| 20 20 20 2a 20 49 66 20 | 79 6f 75 20 61 72 65 20 | * If |you are |
|00005390| 67 65 74 74 69 6e 67 20 | 6f 72 20 73 65 74 74 69 |getting |or setti|
|000053a0| 6e 67 20 6d 75 6c 74 69 | 70 6c 65 20 70 72 65 66 |ng multi|ple pref|
|000053b0| 65 72 65 6e 63 65 73 2c | 20 79 6f 75 20 73 68 6f |erences,| you sho|
|000053c0| 75 6c 64 20 70 6c 61 63 | 65 0d 20 20 20 20 20 2a |uld plac|e. *|
|000053d0| 20 74 68 65 73 65 20 63 | 61 6c 6c 73 20 77 69 74 | these c|alls wit|
|000053e0| 68 69 6e 20 61 6e 20 49 | 43 42 65 67 69 6e 2f 49 |hin an I|CBegin/I|
|000053f0| 43 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 20 20 |CEnd pai|r.. |
|00005400| 2a 20 49 66 20 79 6f 75 | 20 63 61 6c 6c 20 74 68 |* If you| call th|
|00005410| 69 73 20 72 6f 75 74 69 | 6e 65 20 6f 75 74 73 69 |is routi|ne outsi|
|00005420| 64 65 20 6f 66 20 73 75 | 63 68 20 61 20 70 61 69 |de of su|ch a pai|
|00005430| 72 2c 20 69 74 20 69 6d | 70 6c 69 63 69 74 6c 79 |r, it im|plicitly|
|00005440| 0d 20 20 20 20 20 2a 20 | 63 61 6c 6c 73 20 49 43 |. * |calls IC|
|00005450| 42 65 67 69 6e 28 69 6e | 73 74 2c 20 69 63 52 65 |Begin(in|st, icRe|
|00005460| 61 64 57 72 69 74 65 50 | 65 72 6d 29 2e 0d 20 20 |adWriteP|erm).. |
|00005470| 20 20 20 2a 20 54 61 6b | 65 73 20 74 68 65 20 6e | * Tak|es the n|
|00005480| 61 6d 65 20 6f 66 20 61 | 6e 20 69 6e 63 6f 6d 69 |ame of a|n incomi|
|00005490| 6e 67 20 66 69 6c 65 20 | 61 6e 64 20 72 65 74 75 |ng file |and retu|
|000054a0| 72 6e 73 20 74 68 65 20 | 6d 6f 73 74 20 61 70 70 |rns the |most app|
|000054b0| 72 6f 70 72 69 61 74 65 | 0d 20 20 20 20 20 2a 20 |ropriate|. * |
|000054c0| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|000054d0| 65 20 65 6e 74 72 79 2c | 20 62 61 73 65 64 20 6f |e entry,| based o|
|000054e0| 6e 20 69 74 73 20 65 78 | 74 65 6e 73 69 6f 6e 2e |n its ex|tension.|
|000054f0| 0d 20 20 20 20 20 2a 20 | 66 69 6c 65 6e 61 6d 65 |. * |filename|
|00005500| 20 6d 75 73 74 20 6e 6f | 74 20 62 65 20 74 68 65 | must no|t be the|
|00005510| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 0d 20 | empty s|tring.. |
|00005520| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|00005530| 50 72 65 66 4e 6f 74 46 | 6f 75 6e 64 45 72 72 20 |PrefNotF|oundErr |
|00005540| 69 66 20 6e 6f 20 73 75 | 69 74 61 62 6c 65 20 65 |if no su|itable e|
|00005550| 6e 74 72 79 20 69 73 20 | 66 6f 75 6e 64 2e 0d 20 |ntry is |found.. |
|00005560| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00005570| 74 69 6f 6e 20 49 43 43 | 4d 61 70 54 79 70 65 43 |tion ICC|MapTypeC|
|00005580| 72 65 61 74 6f 72 28 69 | 6e 73 74 20 3a 20 43 6f |reator(i|nst : Co|
|00005590| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|000055a0| 20 66 54 79 70 65 20 3a | 20 4f 53 54 79 70 65 3b | fType :| OSType;|
|000055b0| 20 66 43 72 65 61 74 6f | 72 20 3a 20 4f 53 54 79 | fCreato|r : OSTy|
|000055c0| 70 65 3b 20 66 69 6c 65 | 6e 61 6d 65 20 3a 20 53 |pe; file|name : S|
|000055d0| 74 72 32 35 35 3b 20 76 | 61 72 20 65 6e 74 72 79 |tr255; v|ar entry|
|000055e0| 20 3a 20 49 43 4d 61 70 | 45 6e 74 72 79 29 20 3a | : ICMap|Entry) :|
|000055f0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|00005600| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|00005610| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|00005620| 24 32 46 33 43 2c 20 31 | 36 2c 20 32 35 2c 20 24 |$2F3C, 1|6, 25, $|
|00005630| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00005640| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00005650| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|00005660| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00005670| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00005680| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00005690| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|000056a0| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |ne.. | * You m|
|000056b0| 75 73 74 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e |ust be i|nside an|
|000056c0| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|000056d0| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|000056e0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 54 |outine..| * T|
|000056f0| 61 6b 65 73 20 74 68 65 | 20 74 79 70 65 20 61 6e |akes the| type an|
|00005700| 64 20 63 72 65 61 74 6f | 72 20 28 61 6e 64 20 6f |d creato|r (and o|
|00005710| 70 74 69 6f 6e 61 6c 6c | 79 20 74 68 65 20 6e 61 |ptionall|y the na|
|00005720| 6d 65 29 20 6f 66 20 61 | 6e 20 6f 75 74 67 6f 69 |me) of a|n outgoi|
|00005730| 6e 67 0d 20 20 20 20 20 | 2a 20 66 69 6c 65 20 61 |ng. |* file a|
|00005740| 6e 64 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 6d |nd retur|ns the m|
|00005750| 6f 73 74 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |ost appr|opriate |
|00005760| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|00005770| 65 20 65 6e 74 72 79 2e | 0d 20 20 20 20 20 2a 20 |e entry.|. * |
|00005780| 54 68 65 20 66 69 6c 65 | 6e 61 6d 65 20 6d 61 79 |The file|name may|
|00005790| 20 62 65 20 65 69 74 68 | 65 72 20 74 68 65 20 6e | be eith|er the n|
|000057a0| 61 6d 65 20 6f 66 20 74 | 68 65 20 6f 75 74 67 6f |ame of t|he outgo|
|000057b0| 69 6e 67 20 66 69 6c 65 | 20 6f 72 0d 20 20 20 20 |ing file| or. |
|000057c0| 20 2a 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 | * the e|mpty str|
|000057d0| 69 6e 67 2e 0d 20 20 20 | 20 20 2a 20 52 65 74 75 |ing.. | * Retu|
|000057e0| 72 6e 73 20 69 63 50 72 | 65 66 4e 6f 74 46 6f 75 |rns icPr|efNotFou|
|000057f0| 6e 64 45 72 72 20 69 66 | 20 6e 6f 20 73 75 69 74 |ndErr if| no suit|
|00005800| 61 62 6c 65 20 65 6e 74 | 72 79 20 66 6f 75 6e 64 |able ent|ry found|
|00005810| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 28 |.. *|). . (|
|00005820| 2a 20 2d 2d 2d 2d 2d 20 | 4d 69 64 20 4c 65 76 65 |* ----- |Mid Leve|
|00005830| 6c 20 52 6f 75 74 69 6e | 65 73 20 2d 2d 2d 2d 2d |l Routin|es -----|
|00005840| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|00005850| 6e 20 49 43 43 4d 61 70 | 45 6e 74 72 69 65 73 46 |n ICCMap|EntriesF|
|00005860| 69 6c 65 6e 61 6d 65 28 | 69 6e 73 74 20 3a 20 43 |ilename(|inst : C|
|00005870| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 73 74 61 6e 63 65 |omponent|Instance|
|00005880| 3b 20 65 6e 74 72 69 65 | 73 20 3a 20 48 61 6e 64 |; entrie|s : Hand|
|00005890| 6c 65 3b 20 66 69 6c 65 | 6e 61 6d 65 20 3a 20 53 |le; file|name : S|
|000058a0| 74 72 32 35 35 3b 20 76 | 61 72 20 65 6e 74 72 79 |tr255; v|ar entry|
|000058b0| 20 3a 20 49 43 4d 61 70 | 45 6e 74 72 79 29 20 3a | : ICMap|Entry) :|
|000058c0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|000058d0| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|000058e0| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|000058f0| 24 32 46 33 43 2c 20 31 | 32 2c 20 32 38 2c 20 24 |$2F3C, 1|2, 28, $|
|00005900| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00005910| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00005920| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|00005930| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00005940| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00005950| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00005960| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00005970| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 64 |ne.. | * You d|
|00005980| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|00005990| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|000059a0| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|000059b0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|000059c0| 2e 0d 20 20 20 20 20 2a | 20 54 61 6b 65 73 20 74 |.. *| Takes t|
|000059d0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 61 6e 20 69 6e |he name |of an in|
|000059e0| 63 6f 6d 69 6e 67 20 66 | 69 6c 65 20 61 6e 64 20 |coming f|ile and |
|000059f0| 72 65 74 75 72 6e 73 20 | 74 68 65 20 6d 6f 73 74 |returns |the most|
|00005a00| 20 61 70 70 72 6f 70 72 | 69 61 74 65 0d 20 20 20 | appropr|iate. |
|00005a10| 20 20 2a 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 | * mapp|ings dat|
|00005a20| 61 62 61 73 65 20 65 6e | 74 72 79 2c 20 62 61 73 |abase en|try, bas|
|00005a30| 65 64 20 6f 6e 20 69 74 | 73 20 65 78 74 65 6e 73 |ed on it|s extens|
|00005a40| 69 6f 6e 2e 0d 20 20 20 | 20 20 2a 20 65 6e 74 72 |ion.. | * entr|
|00005a50| 69 65 73 20 6d 75 73 74 | 20 62 65 20 61 20 68 61 |ies must| be a ha|
|00005a60| 6e 64 6c 65 20 74 6f 20 | 61 20 76 61 6c 69 64 20 |ndle to |a valid |
|00005a70| 49 43 20 6d 61 70 70 69 | 6e 67 73 20 64 61 74 61 |IC mappi|ngs data|
|00005a80| 62 61 73 65 20 70 72 65 | 66 65 72 65 6e 63 65 2e |base pre|ference.|
|00005a90| 0d 20 20 20 20 20 2a 20 | 66 69 6c 65 6e 61 6d 65 |. * |filename|
|00005aa0| 20 6d 75 73 74 20 6e 6f | 74 20 62 65 20 74 68 65 | must no|t be the|
|00005ab0| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 0d 20 | empty s|tring.. |
|00005ac0| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|00005ad0| 50 72 65 66 4e 6f 74 46 | 6f 75 6e 64 45 72 72 20 |PrefNotF|oundErr |
|00005ae0| 69 66 20 6e 6f 20 73 75 | 69 74 61 62 6c 65 20 65 |if no su|itable e|
|00005af0| 6e 74 72 79 20 69 73 20 | 66 6f 75 6e 64 2e 0d 20 |ntry is |found.. |
|00005b00| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00005b10| 74 69 6f 6e 20 49 43 43 | 4d 61 70 45 6e 74 72 69 |tion ICC|MapEntri|
|00005b20| 65 73 54 79 70 65 43 72 | 65 61 74 6f 72 28 69 6e |esTypeCr|eator(in|
|00005b30| 73 74 20 3a 20 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |st : Com|ponentIn|
|00005b40| 73 74 61 6e 63 65 3b 20 | 65 6e 74 72 69 65 73 20 |stance; |entries |
|00005b50| 3a 20 48 61 6e 64 6c 65 | 3b 20 66 54 79 70 65 20 |: Handle|; fType |
|00005b60| 3a 20 4f 53 54 79 70 65 | 3b 20 66 43 72 65 61 74 |: OSType|; fCreat|
|00005b70| 6f 72 20 3a 20 4f 53 54 | 79 70 65 3b 20 66 69 6c |or : OST|ype; fil|
|00005b80| 65 6e 61 6d 65 20 3a 20 | 53 74 72 32 35 35 3b 20 |ename : |Str255; |
|00005b90| 76 61 72 20 65 6e 74 72 | 79 20 3a 20 49 43 4d 61 |var entr|y : ICMa|
|00005ba0| 70 45 6e 74 72 79 29 20 | 3a 20 49 43 45 72 72 6f |pEntry) |: ICErro|
|00005bb0| 72 3b 0d 20 20 7b 24 69 | 66 63 20 6e 6f 74 20 47 |r;. {$i|fc not G|
|00005bc0| 65 6e 65 72 61 74 69 6e | 67 43 46 4d 7d 0d 20 20 |eneratin|gCFM}. |
|00005bd0| 20 20 69 6e 6c 69 6e 65 | 20 24 32 46 33 43 2c 20 | inline| $2F3C, |
|00005be0| 32 30 2c 20 32 39 2c 20 | 24 37 30 30 30 2c 20 24 |20, 29, |$7000, $|
|00005bf0| 41 38 32 41 3b 0d 20 20 | 7b 24 65 6e 64 63 7d 0d |A82A;. |{$endc}.|
|00005c00| 20 20 20 20 28 2a 20 52 | 65 71 75 69 72 65 73 20 | (* R|equires |
|00005c10| 49 43 20 31 2e 31 2e 0d | 20 20 20 20 20 2a 20 59 |IC 1.1..| * Y|
|00005c20| 6f 75 20 6d 75 73 74 20 | 73 70 65 63 69 66 79 20 |ou must |specify |
|00005c30| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |a config|uration |
|00005c40| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|00005c50| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00005c60| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | * You |do not h|
|00005c70| 61 76 65 20 74 6f 20 62 | 65 20 69 6e 73 69 64 65 |ave to b|e inside|
|00005c80| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|00005c90| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|00005ca0| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00005cb0| 2a 20 54 61 6b 65 73 20 | 74 68 65 20 74 79 70 65 |* Takes |the type|
|00005cc0| 20 61 6e 64 20 63 72 65 | 61 74 6f 72 20 28 61 6e | and cre|ator (an|
|00005cd0| 64 20 6f 70 74 69 6f 6e | 61 6c 6c 79 20 74 68 65 |d option|ally the|
|00005ce0| 20 6e 61 6d 65 29 20 6f | 66 20 61 6e 20 6f 75 74 | name) o|f an out|
|00005cf0| 67 6f 69 6e 67 0d 20 20 | 20 20 20 2a 20 66 69 6c |going. | * fil|
|00005d00| 65 20 61 6e 64 20 72 65 | 74 75 72 6e 73 20 74 68 |e and re|turns th|
|00005d10| 65 20 6d 6f 73 74 20 61 | 70 70 72 6f 70 72 69 61 |e most a|ppropria|
|00005d20| 74 65 20 6d 61 70 70 69 | 6e 67 73 20 64 61 74 61 |te mappi|ngs data|
|00005d30| 62 61 73 65 20 65 6e 74 | 72 79 2e 0d 20 20 20 20 |base ent|ry.. |
|00005d40| 20 2a 20 65 6e 74 72 69 | 65 73 20 6d 75 73 74 20 | * entri|es must |
|00005d50| 62 65 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 61 |be a han|dle to a|
|00005d60| 20 76 61 6c 69 64 20 49 | 43 20 6d 61 70 70 69 6e | valid I|C mappin|
|00005d70| 67 73 20 64 61 74 61 62 | 61 73 65 20 70 72 65 66 |gs datab|ase pref|
|00005d80| 65 72 65 6e 63 65 2e 0d | 20 20 20 20 20 2a 20 54 |erence..| * T|
|00005d90| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 6d 61 79 20 |he filen|ame may |
|00005da0| 62 65 20 65 69 74 68 65 | 72 20 74 68 65 20 6e 61 |be eithe|r the na|
|00005db0| 6d 65 20 6f 66 20 74 68 | 65 20 6f 75 74 67 6f 69 |me of th|e outgoi|
|00005dc0| 6e 67 20 66 69 6c 65 20 | 6f 72 0d 20 20 20 20 20 |ng file |or. |
|00005dd0| 2a 20 74 68 65 20 65 6d | 70 74 79 20 73 74 72 69 |* the em|pty stri|
|00005de0| 6e 67 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ng.. | * Retur|
|00005df0| 6e 73 20 69 63 50 72 65 | 66 4e 6f 74 46 6f 75 6e |ns icPre|fNotFoun|
|00005e00| 64 45 72 72 20 69 66 20 | 6e 6f 20 73 75 69 74 61 |dErr if |no suita|
|00005e10| 62 6c 65 20 65 6e 74 72 | 79 20 66 6f 75 6e 64 2e |ble entr|y found.|
|00005e20| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 28 2a |. *)|. . (*|
|00005e30| 20 2d 2d 2d 2d 2d 20 4c | 6f 77 20 4c 65 76 65 6c | ----- L|ow Level|
|00005e40| 20 52 6f 75 74 69 6e 65 | 73 20 2d 2d 2d 2d 2d 20 | Routine|s ----- |
|00005e50| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00005e60| 20 49 43 43 43 6f 75 6e | 74 4d 61 70 45 6e 74 72 | ICCCoun|tMapEntr|
|00005e70| 69 65 73 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |ies(inst| : Compo|
|00005e80| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 65 6e |nentInst|ance; en|
|00005e90| 74 72 69 65 73 20 3a 20 | 48 61 6e 64 6c 65 3b 20 |tries : |Handle; |
|00005ea0| 76 61 72 20 63 6f 75 6e | 74 20 3a 20 6c 6f 6e 67 |var coun|t : long|
|00005eb0| 69 6e 74 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |int) : I|CError;.|
|00005ec0| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|00005ed0| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|00005ee0| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 38 2c 20 |nline $2|F3C, 8, |
|00005ef0| 31 38 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 |18, $700|0, $A82A|
|00005f00| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|00005f10| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00005f20| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.1.. | * You m|
|00005f30| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|00005f40| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00005f50| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00005f60| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00005f70| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00005f80| 74 6f 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |to be in|side an |
|00005f90| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00005fa0| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00005fb0| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 43 6f |utine.. | * Co|
|00005fc0| 75 6e 74 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |unts the| number |
|00005fd0| 6f 66 20 65 6e 74 72 69 | 65 73 20 69 6e 20 74 68 |of entri|es in th|
|00005fe0| 65 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |e mappin|gs datab|
|00005ff0| 61 73 65 2e 0d 20 20 20 | 20 20 2a 20 65 6e 74 72 |ase.. | * entr|
|00006000| 69 65 73 20 6d 75 73 74 | 20 62 65 20 61 20 68 61 |ies must| be a ha|
|00006010| 6e 64 6c 65 20 74 6f 20 | 61 20 76 61 6c 69 64 20 |ndle to |a valid |
|00006020| 49 43 20 6d 61 70 70 69 | 6e 67 73 20 64 61 74 61 |IC mappi|ngs data|
|00006030| 62 61 73 65 20 70 72 65 | 66 65 72 65 6e 63 65 2e |base pre|ference.|
|00006040| 0d 20 20 20 20 20 2a 20 | 63 6f 75 6e 74 20 69 73 |. * |count is|
|00006050| 20 73 65 74 20 74 6f 20 | 74 68 65 20 6e 75 6d 62 | set to |the numb|
|00006060| 65 72 20 6f 66 20 65 6e | 74 72 69 65 73 2e 0d 20 |er of en|tries.. |
|00006070| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00006080| 74 69 6f 6e 20 49 43 43 | 47 65 74 49 6e 64 4d 61 |tion ICC|GetIndMa|
|00006090| 70 45 6e 74 72 79 28 69 | 6e 73 74 20 3a 20 43 6f |pEntry(i|nst : Co|
|000060a0| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|000060b0| 20 65 6e 74 72 69 65 73 | 20 3a 20 48 61 6e 64 6c | entries| : Handl|
|000060c0| 65 3b 20 6e 64 78 20 3a | 20 6c 6f 6e 67 69 6e 74 |e; ndx :| longint|
|000060d0| 3b 20 76 61 72 20 70 6f | 73 20 3a 20 6c 6f 6e 67 |; var po|s : long|
|000060e0| 69 6e 74 3b 20 76 61 72 | 20 65 6e 74 72 79 20 3a |int; var| entry :|
|000060f0| 20 49 43 4d 61 70 45 6e | 74 72 79 29 20 3a 20 49 | ICMapEn|try) : I|
|00006100| 43 45 72 72 6f 72 3b 0d | 20 20 7b 24 69 66 63 20 |CError;.| {$ifc |
|00006110| 6e 6f 74 20 47 65 6e 65 | 72 61 74 69 6e 67 43 46 |not Gene|ratingCF|
|00006120| 4d 7d 0d 20 20 20 20 69 | 6e 6c 69 6e 65 20 24 32 |M}. i|nline $2|
|00006130| 46 33 43 2c 20 31 36 2c | 20 31 39 2c 20 24 37 30 |F3C, 16,| 19, $70|
|00006140| 30 30 2c 20 24 41 38 32 | 41 3b 0d 20 20 7b 24 65 |00, $A82|A;. {$e|
|00006150| 6e 64 63 7d 0d 20 20 20 | 20 28 2a 20 52 65 71 75 |ndc}. | (* Requ|
|00006160| 69 72 65 73 20 49 43 20 | 31 2e 31 2e 0d 20 20 20 |ires IC |1.1.. |
|00006170| 20 20 2a 20 59 6f 75 20 | 6d 75 73 74 20 73 70 65 | * You |must spe|
|00006180| 63 69 66 79 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |cify a c|onfigura|
|00006190| 74 69 6f 6e 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |tion bef|ore call|
|000061a0| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|000061b0| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 64 6f 20 |.. *| You do |
|000061c0| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 62 65 20 69 |not have| to be i|
|000061d0| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|000061e0| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|000061f0| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00006200| 20 20 20 20 20 2a 20 47 | 65 74 73 20 74 68 65 20 | * G|ets the |
|00006210| 6e 64 78 27 74 68 20 65 | 6e 74 72 79 20 69 6e 20 |ndx'th e|ntry in |
|00006220| 74 68 65 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 |the mapp|ings dat|
|00006230| 61 62 61 73 65 2e 0d 20 | 20 20 20 20 2a 20 65 6e |abase.. | * en|
|00006240| 74 72 69 65 73 20 6d 75 | 73 74 20 62 65 20 61 20 |tries mu|st be a |
|00006250| 68 61 6e 64 6c 65 20 74 | 6f 20 61 20 76 61 6c 69 |handle t|o a vali|
|00006260| 64 20 49 43 20 6d 61 70 | 70 69 6e 67 73 20 64 61 |d IC map|pings da|
|00006270| 74 61 62 61 73 65 20 70 | 72 65 66 65 72 65 6e 63 |tabase p|referenc|
|00006280| 65 2e 0d 20 20 20 20 20 | 2a 20 6e 64 78 20 6d 75 |e.. |* ndx mu|
|00006290| 73 74 20 62 65 20 69 6e | 20 74 68 65 20 72 61 6e |st be in| the ran|
|000062a0| 67 65 20 66 72 6f 6d 20 | 31 20 74 6f 20 74 68 65 |ge from |1 to the|
|000062b0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 65 6e 74 72 69 | number |of entri|
|000062c0| 65 73 20 69 6e 20 74 68 | 65 20 64 61 74 61 62 61 |es in th|e databa|
|000062d0| 73 65 2e 0d 20 20 20 20 | 20 2a 20 54 68 65 20 76 |se.. | * The v|
|000062e0| 61 6c 75 65 20 6f 66 20 | 70 6f 73 20 69 73 20 69 |alue of |pos is i|
|000062f0| 67 6e 6f 72 65 64 20 6f | 6e 20 69 6e 70 75 74 2e |gnored o|n input.|
|00006300| 20 70 6f 73 20 69 73 20 | 73 65 74 20 74 6f 20 74 | pos is |set to t|
|00006310| 68 65 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 0d 20 |he posit|ion of. |
|00006320| 20 20 20 20 2a 20 74 68 | 65 20 6e 64 78 27 74 68 | * th|e ndx'th|
|00006330| 20 65 6e 74 72 79 20 69 | 6e 20 74 68 65 20 64 61 | entry i|n the da|
|00006340| 74 61 62 61 73 65 20 61 | 6e 64 20 69 73 20 73 75 |tabase a|nd is su|
|00006350| 69 74 61 62 6c 65 20 66 | 6f 72 20 70 61 73 73 69 |itable f|or passi|
|00006360| 6e 67 20 62 61 63 6b 0d | 20 20 20 20 20 2a 20 69 |ng back.| * i|
|00006370| 6e 74 6f 20 49 43 53 65 | 74 4d 61 70 45 6e 74 72 |nto ICSe|tMapEntr|
|00006380| 79 2e 0d 20 20 20 20 20 | 2a 20 44 6f 65 73 20 6e |y.. |* Does n|
|00006390| 6f 74 20 72 65 74 75 72 | 6e 20 61 6e 79 20 75 73 |ot retur|n any us|
|000063a0| 65 72 20 64 61 74 61 20 | 61 73 73 6f 63 69 61 74 |er data |associat|
|000063b0| 65 64 20 77 69 74 68 20 | 74 68 65 20 65 6e 74 72 |ed with |the entr|
|000063c0| 79 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |y.. |*). . |
|000063d0| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 47 65 74 4d |function| ICCGetM|
|000063e0| 61 70 45 6e 74 72 79 28 | 69 6e 73 74 20 3a 20 43 |apEntry(|inst : C|
|000063f0| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 73 74 61 6e 63 65 |omponent|Instance|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.